mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Fix locked mouse cursor due to SDL_SetRelativeMouseMode even when --no-grab was specified
This commit is contained in:
parent
54d8606b78
commit
fcab53b3f7
1 changed files with 5 additions and 3 deletions
8
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
8
extern/sdl4ogre/sdlinputwrapper.cpp
vendored
|
@ -239,9 +239,11 @@ namespace SFO
|
||||||
|
|
||||||
mWrapPointer = false;
|
mWrapPointer = false;
|
||||||
|
|
||||||
//eep, wrap the pointer manually if the input driver doesn't support
|
// eep, wrap the pointer manually if the input driver doesn't support
|
||||||
//relative positioning natively
|
// relative positioning natively
|
||||||
bool success = SDL_SetRelativeMouseMode(relative ? SDL_TRUE : SDL_FALSE) == 0;
|
// also use wrapping if no-grab was specified in options (SDL_SetRelativeMouseMode
|
||||||
|
// appears to eat the mouse cursor when pausing in a debugger)
|
||||||
|
bool success = mAllowGrab && SDL_SetRelativeMouseMode(relative ? SDL_TRUE : SDL_FALSE) == 0;
|
||||||
if(relative && !success)
|
if(relative && !success)
|
||||||
mWrapPointer = true;
|
mWrapPointer = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue