mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Change window focus handling (disable input grab when focus lost)
This commit is contained in:
parent
939f2136c0
commit
f2100fbad7
|
@ -249,7 +249,12 @@ int CInput::Update()
|
|||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
m_MouseFocus = false;
|
||||
IgnoreKeys = true;
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
if(m_InputGrabbed)
|
||||
{
|
||||
MouseModeAbsolute();
|
||||
// Remember that we had relative mouse
|
||||
m_InputGrabbed = true;
|
||||
}
|
||||
break;
|
||||
#if defined(CONF_PLATFORM_MACOSX) // Todo: remove this when fixed in SDL
|
||||
case SDL_WINDOWEVENT_MAXIMIZED:
|
||||
|
|
Loading…
Reference in a new issue