Skip to content

Commit 1707ee1

Browse files
committed
Grab keyboard when the game is not launched with -nomousegrab
Avoid system shortcuts getting in the way of the game
1 parent 3f7c289 commit 1707ee1

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

renderer/HardwareOpenGL.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ int opengl_Setup(oeApplication *app, const int *width, const int *height) {
467467

468468
bool grabMouse = FindArgChar("-nomousegrab", 'm') == 0;
469469
SDL_SetWindowRelativeMouseMode(GSDLWindow, grabMouse);
470+
SDL_SetWindowKeyboardGrab(GSDLWindow, grabMouse);
470471

471472
SDL_SetWindowFullscreen(GSDLWindow, fullscreen);
472473
} else {

0 commit comments

Comments
 (0)