From 53e80d7f540ff2d5a41016f91011b2cbadfc874e Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Mon, 7 Sep 2015 22:25:38 +0200 Subject: [PATCH] Fix #7940 (analog test screen). "Debounce" doubleclicks. --- UI/ControlMappingScreen.cpp | 1 + Windows/WndMainWindow.cpp | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index eee16c1e9f..60a94780f0 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -433,6 +433,7 @@ bool AnalogTestScreen::key(const KeyInput &key) { } bool AnalogTestScreen::axis(const AxisInput &axis) { + UIScreen::axis(axis); // This is mainly to catch axis events that would otherwise get translated // into arrow keys, since seeing keyboard arrow key events appear when using // a controller would be confusing for the user. diff --git a/Windows/WndMainWindow.cpp b/Windows/WndMainWindow.cpp index 480dd8c35c..79a65fc7f9 100644 --- a/Windows/WndMainWindow.cpp +++ b/Windows/WndMainWindow.cpp @@ -1018,8 +1018,10 @@ namespace MainWindow if (!g_Config.bShowTouchControls && GetUIState() == UISTATE_INGAME) { PostMessage(hwndMain, WM_USER_TOGGLE_FULLSCREEN, 0, 0); } + lastMouseDown = 0.0; + } else { + lastMouseDown = real_time_now(); } - lastMouseDown = real_time_now(); } break;