Get rid of "WARNING: unknown event 770" on Windows

It's an SDL_TEXTEDITING event which we seem to get on Windows whenever
the Window gains focus (or is created). I think it can be safely
ignored, so that's what I do.

I also changed how those warnings are printed - as a hex number now,
because they're defined as hex numbers in the SDL source and it's easier
to find out what kind of event it is this way.
This commit is contained in:
Daniel Gibson 2015-10-05 15:14:42 +02:00
parent dad0eda29e
commit 8f4f1ca39f

View file

@ -544,6 +544,10 @@ sysEvent_t Sys_GetEvent() {
}
continue; // handle next event
case SDL_TEXTEDITING:
// on windows we get this event whenever the window gains focus.. just ignore it.
continue;
#endif
case SDL_MOUSEMOTION:
@ -625,7 +629,7 @@ sysEvent_t Sys_GetEvent() {
continue; // handle next event
}
default:
common->Warning("unknown event %u", ev.type);
common->Warning("unknown SDL event 0x%x", ev.type);
continue; // handle next event
}
}