mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 12:58:00 +03:00
Merge branch 'shutupsdl' into 'master'
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Some checks failed
Build and test / Ubuntu (push) Has been cancelled
Build and test / MacOS (push) Has been cancelled
Build and test / Read .env file and expose it as output (push) Has been cancelled
Build and test / Windows (2019) (push) Has been cancelled
Build and test / Windows (2022) (push) Has been cancelled
Silence SDL3 window/display events coming from SDL2-compat See merge request OpenMW/openmw!4531
This commit is contained in:
commit
782c274d86
1 changed files with 12 additions and 0 deletions
|
@ -76,6 +76,18 @@ namespace SDLUtil
|
|||
|
||||
while (SDL_PollEvent(&evt))
|
||||
{
|
||||
#if SDL_VERSION_ATLEAST(2, 30, 50)
|
||||
// SDL2-compat may pass us SDL3 display and window events alongside the SDL2 events for funsies
|
||||
// Until we are ready to move to SDL3, we'll want to prevent the noise
|
||||
|
||||
// Silence 0x151 to 0x1FF range
|
||||
if (evt.type > SDL_DISPLAYEVENT && evt.type < SDL_WINDOWEVENT)
|
||||
continue;
|
||||
|
||||
// Silence 0x202 to 0x2FF range
|
||||
if (evt.type > SDL_SYSWMEVENT && evt.type < SDL_KEYDOWN)
|
||||
continue;
|
||||
#endif
|
||||
switch (evt.type)
|
||||
{
|
||||
case SDL_MOUSEMOTION:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue