summaryrefslogtreecommitdiff
path: root/src/utils/sdl2helper.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-24 13:33:09 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commit2652836af364935294a2c731de74502de530f9e6 (patch)
tree97a19407af17f2ad19d830a41e35b41771a5df27 /src/utils/sdl2helper.cpp
parentc63a2a04e47c361a7254b0749298de84a6f331fa (diff)
downloadmanaverse-2652836af364935294a2c731de74502de530f9e6.tar.gz
manaverse-2652836af364935294a2c731de74502de530f9e6.tar.bz2
manaverse-2652836af364935294a2c731de74502de530f9e6.tar.xz
manaverse-2652836af364935294a2c731de74502de530f9e6.zip
fix "grab input" in SDL2.
Diffstat (limited to 'src/utils/sdl2helper.cpp')
-rw-r--r--src/utils/sdl2helper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/sdl2helper.cpp b/src/utils/sdl2helper.cpp
index 1ae8b087f..442d40990 100644
--- a/src/utils/sdl2helper.cpp
+++ b/src/utils/sdl2helper.cpp
@@ -47,4 +47,9 @@ void SDL::SetWindowIcon(SDL_Window *const window, SDL_Surface *const icon)
SDL_SetWindowIcon(window, icon);
}
+void SDL::grabInput(SDL_Window *const window, const bool grab)
+{
+ SDL_SetWindowGrab(window, grab ? SDL_TRUE : SDL_FALSE);
+}
+
#endif // USE_SDL2