| 7344 | } |
| 7345 | |
| 7346 | static void remove_compa_config (struct uae_prefs *prefs, int index) |
| 7347 | { |
| 7348 | int typelist; |
| 7349 | const int *atpp; |
| 7350 | int inputlist[MAX_COMPA_INPUTLIST]; |
| 7351 | |
| 7352 | if (inputdevice_get_compatibility_input (prefs, index, &typelist, inputlist, &atpp) <= 0) |
| 7353 | return; |
| 7354 | for (int i = 0; inputlist[i] >= 0; i++) { |
| 7355 | int evtnum = inputlist[i]; |
| 7356 | const int *atp = atpp; |
| 7357 | |
| 7358 | int atpidx = 0; |
| 7359 | while (*atp >= 0) { |
| 7360 | if (*atp == evtnum) { |
| 7361 | atp++; |
| 7362 | atpidx = 2; |
| 7363 | break; |
| 7364 | } |
| 7365 | if (atp[1] == evtnum || atp[2] == evtnum) { |
| 7366 | atpidx = 1; |
| 7367 | break; |
| 7368 | } |
| 7369 | atp += 3; |
| 7370 | } |
| 7371 | while (atpidx >= 0) { |
| 7372 | for (int l = 0; l < MAX_INPUT_DEVICES; l++) { |
| 7373 | clearevent (&prefs->joystick_settings[GAMEPORT_INPUT_SETTINGS][l], evtnum); |
| 7374 | clearevent (&prefs->mouse_settings[GAMEPORT_INPUT_SETTINGS][l], evtnum); |
| 7375 | clearkbrevent (&prefs->keyboard_settings[GAMEPORT_INPUT_SETTINGS][l], evtnum); |
| 7376 | } |
| 7377 | evtnum = *atp++; |
| 7378 | atpidx--; |
| 7379 | } |
| 7380 | } |
| 7381 | } |
| 7382 | |
| 7383 | static void cleardev_custom (struct uae_input_device *uid, int num, int index) |
| 7384 | { |
no test coverage detected