mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Fix input as the comments suggest for the next SDL version
SDL fixed the bug on Windows that releasing the mouse while tabbing out directly refocuses the window, which broke desktop fullscreen (and maybe windowed fullscreen)
This commit is contained in:
parent
181d831411
commit
7fa14139d8
|
@ -720,8 +720,7 @@ int CInput::Update()
|
|||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
if(m_InputGrabbed)
|
||||
{
|
||||
// Enable this in case SDL 2.0.16 has major bugs or 2.0.18 still doesn't fix tabbing out with relative mouse
|
||||
// MouseModeRelative();
|
||||
MouseModeRelative();
|
||||
// Clear pending relative mouse motion
|
||||
SDL_GetRelativeMouseState(nullptr, nullptr);
|
||||
}
|
||||
|
@ -733,8 +732,7 @@ int CInput::Update()
|
|||
IgnoreKeys = true;
|
||||
if(m_InputGrabbed)
|
||||
{
|
||||
// Enable this in case SDL 2.0.16 has major bugs or 2.0.18 still doesn't fix tabbing out with relative mouse
|
||||
// MouseModeAbsolute();
|
||||
MouseModeAbsolute();
|
||||
// Remember that we had relative mouse
|
||||
m_InputGrabbed = true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue