From b9218cafb34235acf267726f0e3fb38f4cd60512 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sat, 10 Feb 2024 18:54:00 +0200 Subject: [PATCH] Input remapping fixes. --- inputdevice.cpp | 2 +- od-win32/win32gui.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/inputdevice.cpp b/inputdevice.cpp index f8cde0e5..26913eef 100644 --- a/inputdevice.cpp +++ b/inputdevice.cpp @@ -7444,7 +7444,7 @@ static void compatibility_copy (struct uae_prefs *prefs, bool gameports) break; } } else if (jd->id >= 0) { - joymodes[i][0] = i ? JSEM_MODE_JOYSTICK : JSEM_MODE_WHEELMOUSE; + joymodes[i][j] = i ? JSEM_MODE_JOYSTICK : JSEM_MODE_WHEELMOUSE; joyinputs[i] = i ? ip_joy2 : ip_mouse1; } } diff --git a/od-win32/win32gui.cpp b/od-win32/win32gui.cpp index 5ecdb7ff..b2f3fadf 100644 --- a/od-win32/win32gui.cpp +++ b/od-win32/win32gui.cpp @@ -19039,6 +19039,9 @@ static void CALLBACK timerfunc (HWND hDlg, UINT uMsg, UINT_PTR idEvent, DWORD dw int events[MAX_COMPA_INPUTLIST]; int max = inputdevice_get_compatibility_input (&workprefs, inputmap_port, &mode, events, &axistable); + if (inputmap_remap_counter >= max) { + inputmap_remap_counter = 0; + } int evtnum = events[inputmap_remap_counter]; int type2 = intputdevice_compa_get_eventtype (evtnum, &axistable2); -- 2.47.3