Dispatch MouseUp events with SDL.

This commit is contained in:
Andreas Kling 2018-10-11 02:55:02 +02:00
parent c61cbf4234
commit 0abc19b0ff

View file

@ -46,6 +46,9 @@ void EventLoopSDL::waitForEvent()
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:
postEvent(&AbstractScreen::the(), make<MouseEvent>(Event::MouseDown, sdlEvent.button.x, sdlEvent.button.y, toMouseButton(sdlEvent.button.button))); postEvent(&AbstractScreen::the(), make<MouseEvent>(Event::MouseDown, sdlEvent.button.x, sdlEvent.button.y, toMouseButton(sdlEvent.button.button)));
return; return;
case SDL_MOUSEBUTTONUP:
postEvent(&AbstractScreen::the(), make<MouseEvent>(Event::MouseUp, sdlEvent.button.x, sdlEvent.button.y, toMouseButton(sdlEvent.button.button)));
return;
} }
} }
} }