Skip to content
Browse files

Disable the warning if the mouse grab request fails

This fails on some SDL drivers and just spams the console.
  • Loading branch information...
1 parent 9e15847 commit 1b1787bb505b5d7b1b14baa88f21bc25902cd817 @dhewg dhewg committed Jul 28, 2012
Showing with 1 addition and 2 deletions.
  1. +1 −2 neo/sys/glimp.cpp
View
3 neo/sys/glimp.cpp
@@ -308,8 +308,7 @@ void GLimp_GrabInput(int flags) {
#if SDL_VERSION_ATLEAST(2, 0, 0)
SDL_ShowCursor(flags & GRAB_HIDECURSOR ? SDL_DISABLE : SDL_ENABLE);
- if (SDL_SetRelativeMouseMode(flags & GRAB_HIDECURSOR ? SDL_TRUE : SDL_FALSE))
- common->Warning("Failed to set relative mouse movement mode");
+ SDL_SetRelativeMouseMode(flags & GRAB_HIDECURSOR ? SDL_TRUE : SDL_FALSE);
SDL_SetWindowGrab(window, grab ? SDL_TRUE : SDL_FALSE);
#else
SDL_ShowCursor(flags & GRAB_HIDECURSOR ? SDL_DISABLE : SDL_ENABLE);

4 comments on commit 1b1787b

@andre-d

If this fails should we have a manual fall-back?

@dhewg
dhewm member
dhewg commented on 1b1787b Jul 30, 2012

Fall back to what? :)

@andre-d

Manually moving the cursor back to the middle every tick

@dhewg
dhewm member
dhewg commented on 1b1787b Jul 31, 2012

Yuck. And I doubt that works on all backends which don't support SDL_SetRelativeMouseMode.

Please sign in to comment.
Something went wrong with that request. Please try again.