| 1390 | } |
| 1391 | |
| 1392 | static 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 | |
| 1412 | static int matchdevice(struct uae_prefs *p, struct inputdevice_functions *inf, const TCHAR *configname, const TCHAR *name) |
| 1413 | { |
no test coverage detected