From 024456048e70ea035318a1f7c0f977dc964f7d5b Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 8 Jun 2019 10:56:54 +0300 Subject: [PATCH] - fixed access to wrong event data in SDL backend Wrong button state event data were read on mouse motion https://forum.zdoom.org/viewtopic.php?t=64950 --- src/posix/sdl/i_input.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/posix/sdl/i_input.cpp b/src/posix/sdl/i_input.cpp index 626b9580f..9e846b0d4 100644 --- a/src/posix/sdl/i_input.cpp +++ b/src/posix/sdl/i_input.cpp @@ -307,7 +307,7 @@ void MessagePump (const SDL_Event &sev) case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONUP: case SDL_MOUSEMOTION: - if (!GUICapture || sev.button.button == 4 || sev.button.button == 5) + if (!GUICapture || (sev.type != SDL_MOUSEMOTION && (sev.button.button == 4 || sev.button.button == 5))) { if(sev.type != SDL_MOUSEMOTION) {