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 authored and madame-rachelle committed Jun 8, 2019
1 parent a3ae9c4 commit c731bb4
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 c731bb4

Please sign in to comment.