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