prepare port for custom mapping, remove all current Amiga side device mappings
| 7429 | |
| 7430 | // prepare port for custom mapping, remove all current Amiga side device mappings |
| 7431 | void 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 |
| 7448 | void inputdevice_compa_clear (struct uae_prefs *prefs, int index) |
| 7449 | { |
nothing calls this directly
no test coverage detected