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

Function inputdevice_updateconfig_internal

src/inputdevice.cpp:8245–8300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8243}
8244
8245void inputdevice_updateconfig_internal (struct uae_prefs *srcprefs, struct uae_prefs *dstprefs)
8246{
8247 keyboard_default = keyboard_default_table[currprefs.input_keyboard_type];
8248
8249 inputdevice_copyjports(srcprefs, dstprefs);
8250 resetinput ();
8251
8252 joysticks = dstprefs->joystick_settings[dstprefs->input_selected_setting];
8253 mice = dstprefs->mouse_settings[dstprefs->input_selected_setting];
8254 keyboards = dstprefs->keyboard_settings[dstprefs->input_selected_setting];
8255 internalevents = dstprefs->internalevent_settings[dstprefs->input_selected_setting];
8256
8257 matchdevices_all (dstprefs);
8258
8259 memset (joysticks2, 0, sizeof joysticks2);
8260 memset (mice2, 0, sizeof mice2);
8261
8262 int input_selected_setting = dstprefs->input_selected_setting;
8263
8264 joysticks = dstprefs->joystick_settings[GAMEPORT_INPUT_SETTINGS];
8265 mice = dstprefs->mouse_settings[GAMEPORT_INPUT_SETTINGS];
8266 keyboards = dstprefs->keyboard_settings[GAMEPORT_INPUT_SETTINGS];
8267 internalevents = dstprefs->internalevent_settings[GAMEPORT_INPUT_SETTINGS];
8268 dstprefs->input_selected_setting = GAMEPORT_INPUT_SETTINGS;
8269
8270 for (int i = 0; i < MAX_INPUT_SETTINGS; i++) {
8271 joysticks[i].enabled = 0;
8272 mice[i].enabled = 0;
8273 }
8274
8275 for (int i = 0; i < MAX_JPORTS_CUSTOM; i++) {
8276 inputdevice_parse_jport_custom(dstprefs, i, -1, NULL);
8277 }
8278
8279 compatibility_copy (dstprefs, true);
8280
8281 dstprefs->input_selected_setting = input_selected_setting;
8282
8283 joysticks = dstprefs->joystick_settings[dstprefs->input_selected_setting];
8284 mice = dstprefs->mouse_settings[dstprefs->input_selected_setting];
8285 keyboards = dstprefs->keyboard_settings[dstprefs->input_selected_setting];
8286 internalevents = dstprefs->internalevent_settings[dstprefs->input_selected_setting];
8287
8288 if (dstprefs->input_selected_setting != GAMEPORT_INPUT_SETTINGS) {
8289 compatibility_copy (dstprefs, false);
8290 }
8291
8292 disableifempty (dstprefs);
8293 scanevents (dstprefs);
8294
8295 if (srcprefs) {
8296 for (int i = 0; i < MAX_JPORTS; i++) {
8297 copyjport(dstprefs, srcprefs, i);
8298 }
8299 }
8300}
8301
8302void inputdevice_updateconfig (struct uae_prefs *srcprefs, struct uae_prefs *dstprefs)

Callers 1

inputdevice_updateconfigFunction · 0.85

Calls 8

inputdevice_copyjportsFunction · 0.85
resetinputFunction · 0.85
matchdevices_allFunction · 0.85
compatibility_copyFunction · 0.85
disableifemptyFunction · 0.85
scaneventsFunction · 0.85
copyjportFunction · 0.85

Tested by

no test coverage detected