diff options
author | Colin Snover | 2017-11-17 11:54:10 -0600 |
---|---|---|
committer | Colin Snover | 2017-11-17 12:01:35 -0600 |
commit | d3a831644c7b9a31b2b74824b7638072a6630fda (patch) | |
tree | c2aba81b8d20cb46a61bf2bc3ae989fec8670c73 /backends/platform/sdl | |
parent | 34abce7478a387cfcac1198cd37ec6cec049f542 (diff) | |
download | scummvm-rg350-d3a831644c7b9a31b2b74824b7638072a6630fda.tar.gz scummvm-rg350-d3a831644c7b9a31b2b74824b7638072a6630fda.tar.bz2 scummvm-rg350-d3a831644c7b9a31b2b74824b7638072a6630fda.zip |
SDL: Grab mouse when ScummVM is started in fullscreen mode
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/sdl-window.cpp | 5 |
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; } |