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

Function inputdevice_compa_prepare_custom

src/inputdevice.cpp:7431–7446  ·  view source on GitHub ↗

prepare port for custom mapping, remove all current Amiga side device mappings

Source from the content-addressed store, hash-verified

7429
7430// prepare port for custom mapping, remove all current Amiga side device mappings
7431void inputdevice_compa_prepare_custom (struct uae_prefs *prefs, int index, int newmode, bool removeold)
7432{
7433 int mode = prefs->jports[index].mode;
7434 if (newmode >= 0) {
7435 mode = newmode;
7436 } else if (mode == 0) {
7437 mode = index == 0 ? JSEM_MODE_WHEELMOUSE : (prefs->cs_cd32cd ? JSEM_MODE_JOYSTICK_CD32 : JSEM_MODE_JOYSTICK);
7438 }
7439 prefs->jports[index].mode = mode;
7440
7441 if (removeold) {
7442 prefs->jports_custom[JSEM_GETCUSTOMIDX(index, prefs)].custom[0] = 0;
7443 remove_compa_config (prefs, index);
7444 remove_custom_config (prefs, index);
7445 }
7446}
7447// clear device before switching to new one
7448void inputdevice_compa_clear (struct uae_prefs *prefs, int index)
7449{

Callers

nothing calls this directly

Calls 2

remove_compa_configFunction · 0.85
remove_custom_configFunction · 0.85

Tested by

no test coverage detected