Skip to content

Commit e2e78c0

Browse files
authored
Merge pull request #98 from dyharlan/master
Fix keyboard event bug where mouse grab combination won't work if SDL_GetModState
2 parents 17cdcc5 + 0267fc8 commit e2e78c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/hostevents_sdl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void EventManager::poll_events()
5656
case SDL_KEYUP: {
5757
// Internal shortcuts to trigger mouse grab, intentionally not
5858
// sent to the host.
59-
if (event.key.keysym.sym == SDLK_g && SDL_GetModState() == KMOD_LCTRL) {
59+
if (SDL_GetModState() & KMOD_LCTRL && event.key.keysym.sym == SDLK_g) {
6060
if (event.type == SDL_KEYUP) {
6161
toggle_mouse_grab(event.key);
6262
}

0 commit comments

Comments
 (0)