From 91f6f5576f8512c751903eaac3c9822f32d55101 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Wed, 11 Jul 2018 20:43:37 +0300 Subject: [PATCH] RP update. --- od-win32/dinput.cpp | 2 +- od-win32/rp.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/od-win32/dinput.cpp b/od-win32/dinput.cpp index 1bf93abe..1260ae5c 100644 --- a/od-win32/dinput.cpp +++ b/od-win32/dinput.cpp @@ -2155,7 +2155,7 @@ static void handle_rawinput_2 (RAWINPUT *raw, LPARAM lParam) USHORT usButtonFlags = rm->usButtonFlags; #ifdef RETROPLATFORM - if (usButtonFlags) { + if (usButtonFlags && isfocus() != 0) { usButtonFlags = rp_rawbuttons(lParam, usButtonFlags); } #endif diff --git a/od-win32/rp.cpp b/od-win32/rp.cpp index fe8b6b33..ca432599 100644 --- a/od-win32/rp.cpp +++ b/od-win32/rp.cpp @@ -522,6 +522,8 @@ static int port_insert (int inputmap_port, int devicetype, DWORD flags, const TC if (devicetype == RP_INPUTDEVICE_JOYSTICK || devicetype == RP_INPUTDEVICE_GAMEPAD || devicetype == RP_INPUTDEVICE_JOYPAD) { if (inputmap_port >= 0 && inputmap_port < 4) { dacttype[inputmap_port] = devicetype; + inputdevice_compa_clear(&changed_prefs, inputmap_port); + inputdevice_joyport_config(&changed_prefs, _T("none"), NULL, inputmap_port, 0, 0, true); return 1; } return 0; -- 2.47.3