Skip to content

Commit 40b5377

Browse files
authored
Update hostevents_sdl.cpp
A further fix by dyharlan to fix the mouse grabbing
1 parent e2e78c0 commit 40b5377

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 (SDL_GetModState() & KMOD_LCTRL && event.key.keysym.sym == SDLK_g) {
59+
if (event.key.keysym.sym == SDLK_g && ((SDL_GetModState() & KMOD_LCTRL) == KMOD_CTRL)) {
6060
if (event.type == SDL_KEYUP) {
6161
toggle_mouse_grab(event.key);
6262
}

0 commit comments

Comments
 (0)