always use relative mouse mode on windows
parent
cbc6b6b40a
commit
05b251433b
|
@ -402,12 +402,15 @@ void inputgrab(bool on)
|
||||||
if(on)
|
if(on)
|
||||||
{
|
{
|
||||||
SDL_ShowCursor(SDL_FALSE);
|
SDL_ShowCursor(SDL_FALSE);
|
||||||
|
#ifndef WIN32
|
||||||
if(!(SDL_GetWindowFlags(screen) & SDL_WINDOW_FULLSCREEN))
|
if(!(SDL_GetWindowFlags(screen) & SDL_WINDOW_FULLSCREEN))
|
||||||
{
|
{
|
||||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||||
relativemouse = false;
|
relativemouse = false;
|
||||||
}
|
}
|
||||||
else if(canrelativemouse)
|
else
|
||||||
|
#endif
|
||||||
|
if(canrelativemouse)
|
||||||
{
|
{
|
||||||
if(SDL_SetRelativeMouseMode(SDL_TRUE) >= 0) relativemouse = true;
|
if(SDL_SetRelativeMouseMode(SDL_TRUE) >= 0) relativemouse = true;
|
||||||
else canrelativemouse = false;
|
else canrelativemouse = false;
|
||||||
|
|
Loading…
Reference in New Issue