mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Merge #4232
4232: Still clear pending mouse motion r=def- a=Jupeyy Same as #3932 ... again :/ ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: Jupeyy <jupjopjap@gmail.com>
This commit is contained in:
commit
4601f7500e
|
@ -469,6 +469,11 @@ int CInput::Update()
|
|||
if(GetMouseMode() != INPUT_MOUSE_MODE_ABSOLUTE)
|
||||
{
|
||||
SDL_ShowCursor(SDL_FALSE);
|
||||
if(SDL_GetRelativeMouseMode())
|
||||
{
|
||||
// Clear pending relative mouse motion
|
||||
SDL_GetRelativeMouseState(0x0, 0x0);
|
||||
}
|
||||
}
|
||||
m_MouseFocus = true;
|
||||
IgnoreKeys = true;
|
||||
|
|
Loading…
Reference in a new issue