MCPcopy Create free account
hub / github.com/BlitterStudio/amiberry / setcompakbevent

Function setcompakbevent

src/inputdevice.cpp:1392–1410  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1390}
1391
1392static void setcompakbevent(struct uae_prefs *p, struct uae_input_device *uid, int l, int evt, int port, int af, uae_u64 flags)
1393{
1394 inputdevice_sparecopy(uid, l, 0);
1395 if (p->jports[port].nokeyboardoverride && uid->port[l][0] == 0) {
1396 uid->eventid[l][MAX_INPUT_SUB_EVENT - 1] = uid->eventid[l][0];
1397 uid->flags[l][MAX_INPUT_SUB_EVENT - 1] = uid->flags[l][0] | ID_FLAG_RESERVEDGAMEPORTSCUSTOM;
1398 uid->custom[l][MAX_INPUT_SUB_EVENT - 1] = my_strdup(uid->custom[l][0]);
1399 uid->eventid[l][MAX_INPUT_SUB_EVENT - 1] = uid->eventid[l][0];
1400 }
1401 uid->eventid[l][0] = evt;
1402 uid->flags[l][0] &= COMPA_RESERVED_FLAGS;
1403 uid->flags[l][0] |= flags;
1404 uid->port[l][0] = port + 1;
1405 xfree(uid->custom[l][0]);
1406 uid->custom[l][0] = NULL;
1407 if (!JSEM_ISCUSTOM(port, p)) {
1408 setautofireevent(uid, l, 0, af, port);
1409 }
1410}
1411
1412static int matchdevice(struct uae_prefs *p, struct inputdevice_functions *inf, const TCHAR *configname, const TCHAR *name)
1413{

Callers 2

setcompakbFunction · 0.85

Calls 2

inputdevice_sparecopyFunction · 0.85
setautofireeventFunction · 0.85

Tested by

no test coverage detected