- 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
This commit is contained in:
alexey.lysiuk 2019-06-08 10:56:54 +03:00
parent 56dcbe8ef8
commit 024456048e

View file

@ -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)
{