From f57b8b19d27badf153e8dba6c84c579929ea66c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 3 Sep 2019 00:01:37 +0200 Subject: [PATCH] Windows: Kill the mouse wheel release timer after it's used to prevent spamming keyup events. --- Windows/MainWindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Windows/MainWindow.cpp b/Windows/MainWindow.cpp index 4dbba48ad..fe66c287c 100644 --- a/Windows/MainWindow.cpp +++ b/Windows/MainWindow.cpp @@ -258,7 +258,7 @@ namespace MainWindow } } - void RelaseMouseWheel() { + void ReleaseMouseWheel() { // For simplicity release both wheel events KeyInput key; key.deviceId = DEVICE_ID_MOUSE; @@ -816,7 +816,8 @@ namespace MainWindow return 0; // Hack: need to release wheel event with a delay for games to register it was "pressed down". case TIMER_WHEELRELEASE: - RelaseMouseWheel(); + ReleaseMouseWheel(); + KillTimer(hWnd, TIMER_WHEELRELEASE); return 0; } break;