From 84a8fdadc5dc61425b8e84baa427ebc7819595e0 Mon Sep 17 00:00:00 2001 From: FlatOutPS2 Date: Fri, 10 Mar 2017 14:45:39 +0100 Subject: [PATCH] LilyPad: Fix F4 button (PCSX2 FrameLimiter toggle) getting blocked Fixes issue where losing focus after pressing alt-tab would end up blocking the F4 button (which is used for turning the PCSX2 FrameLimiter on and off). Fixes: https://github.com/PCSX2/pcsx2/issues/1797 --- plugins/LilyPad/LilyPad.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/LilyPad/LilyPad.cpp b/plugins/LilyPad/LilyPad.cpp index 376d6fa4fa..725c9b490e 100644 --- a/plugins/LilyPad/LilyPad.cpp +++ b/plugins/LilyPad/LilyPad.cpp @@ -1579,6 +1579,9 @@ keyEvent *CALLBACK PADkeyEvent() #ifdef _MSC_VER static char shiftDown = 0; static char altDown = 0; + if (!activeWindow) + altDown = shiftDown = 0; + if (miceEnabled && (ev.key == VK_ESCAPE || (int)ev.key == -2) && ev.evt == KEYPRESS) { // Disable mouse/KB hooks on escape (before going into paused mode). // This is a hack, since PADclose (which is called on pause) should enevtually also deactivate the