aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Snover2017-11-17 11:54:10 -0600
committerColin Snover2017-11-17 12:01:35 -0600
commitd3a831644c7b9a31b2b74824b7638072a6630fda (patch)
treec2aba81b8d20cb46a61bf2bc3ae989fec8670c73
parent34abce7478a387cfcac1198cd37ec6cec049f542 (diff)
downloadscummvm-rg350-d3a831644c7b9a31b2b74824b7638072a6630fda.tar.gz
scummvm-rg350-d3a831644c7b9a31b2b74824b7638072a6630fda.tar.bz2
scummvm-rg350-d3a831644c7b9a31b2b74824b7638072a6630fda.zip
SDL: Grab mouse when ScummVM is started in fullscreen mode
-rw-r--r--backends/platform/sdl/sdl-window.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/backends/platform/sdl/sdl-window.cpp b/backends/platform/sdl/sdl-window.cpp
index b38a97c5ef..39c5f8661f 100644
--- a/backends/platform/sdl/sdl-window.cpp
+++ b/backends/platform/sdl/sdl-window.cpp
@@ -279,10 +279,11 @@ bool SdlWindow::createOrUpdateWindow(int width, int height, uint32 flags) {
}
SDL_SetWindowFullscreen(_window, fullscreenFlags);
- const bool shouldGrab = (flags & SDL_WINDOW_INPUT_GRABBED) | fullscreenFlags;
- SDL_SetWindowGrab(_window, shouldGrab ? SDL_TRUE : SDL_FALSE);
}
+ const bool shouldGrab = (flags & SDL_WINDOW_INPUT_GRABBED) || fullscreenFlags;
+ SDL_SetWindowGrab(_window, shouldGrab ? SDL_TRUE : SDL_FALSE);
+
if (!_window) {
return false;
}