summaryrefslogtreecommitdiff
path: root/src/utils/sdlhelper.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/sdlhelper.cpp
parentc63a2a04e47c361a7254b0749298de84a6f331fa (diff)
downloadplus-2652836af364935294a2c731de74502de530f9e6.tar.gz
plus-2652836af364935294a2c731de74502de530f9e6.tar.bz2
plus-2652836af364935294a2c731de74502de530f9e6.tar.xz
plus-2652836af364935294a2c731de74502de530f9e6.zip
fix "grab input" in SDL2.
Diffstat (limited to 'src/utils/sdlhelper.cpp')
-rw-r--r--src/utils/sdlhelper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/sdlhelper.cpp b/src/utils/sdlhelper.cpp
index 9d28f6c96..a470ce927 100644
--- a/src/utils/sdlhelper.cpp
+++ b/src/utils/sdlhelper.cpp
@@ -73,4 +73,9 @@ void SDL::SetWindowIcon(SDL_Surface *const window A_UNUSED,
SDL_WM_SetIcon(icon, nullptr);
}
+void SDL::grabInput(SDL_Surface *const window A_UNUSED, const bool grab)
+{
+ SDL_WM_GrabInput(grab ? SDL_GRAB_ON : SDL_GRAB_OFF);
+}
+
#endif // USE_SDL2