From 2652836af364935294a2c731de74502de530f9e6 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 24 Aug 2013 13:33:09 +0300 Subject: fix "grab input" in SDL2. --- src/utils/sdlhelper.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/utils/sdlhelper.cpp') 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 -- cgit v1.2.3-70-g09d2