summaryrefslogtreecommitdiff
path: root/src/utils/sdlhelper.cpp
diff options
context:
space:
mode:
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