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

Function cleardevkbr_custom

src/inputdevice.cpp:7400–7418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7398 }
7399}
7400static void cleardevkbr_custom(struct uae_input_device *uid, int num, int index)
7401{
7402 for (int i = 0; i < MAX_INPUT_DEVICE_EVENTS; i++) {
7403 for (int j = 0; j < MAX_INPUT_SUB_EVENT; j++) {
7404 if (uid[num].port[i][j] == index + 1) {
7405 uid[num].eventid[i][j] = 0;
7406 uid[num].flags[i][j] &= COMPA_RESERVED_FLAGS;
7407 xfree (uid[num].custom[i][j]);
7408 uid[num].custom[i][j] = NULL;
7409 uid[num].port[i][j] = 0;
7410 if (uid[num].port[i][SPARE_SUB_EVENT]) {
7411 inputdevice_sparerestore (&uid[num], i, j);
7412 } else if (j == 0) {
7413 set_kbr_default_event (&uid[num], keyboard_default, i);
7414 }
7415 }
7416 }
7417 }
7418}
7419
7420// remove all gameports mappings mapped to port 'index'
7421static void remove_custom_config (struct uae_prefs *prefs, int index)

Callers 1

remove_custom_configFunction · 0.85

Calls 2

inputdevice_sparerestoreFunction · 0.85
set_kbr_default_eventFunction · 0.85

Tested by

no test coverage detected