Skip to content

Commit

Permalink
- fixed access to wrong event data in SDL backend
Browse files Browse the repository at this point in the history
Wrong button state event data were read on mouse motion

https://forum.zdoom.org/viewtopic.php?t=64950
  • Loading branch information
alexey-lysiuk committed Jun 8, 2019
1 parent 56dcbe8 commit 0244560
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/posix/sdl/i_input.cpp
Expand Up @@ -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)
{
Expand Down

0 comments on commit 0244560

Please sign in to comment.