mirror of
https://github.com/encounter/SDL.git
synced 2025-05-23 15:51:23 +00:00
Messages posted on the same tick are not new
This commit is contained in:
parent
0789610cfb
commit
0b6a821188
@ -1525,7 +1525,7 @@ WIN_PumpEvents(_THIS)
|
|||||||
{
|
{
|
||||||
const Uint8 *keystate;
|
const Uint8 *keystate;
|
||||||
MSG msg;
|
MSG msg;
|
||||||
DWORD start_ticks = GetTickCount();
|
DWORD end_ticks = GetTickCount() + 1;
|
||||||
int new_messages = 0;
|
int new_messages = 0;
|
||||||
|
|
||||||
if (g_WindowsEnableMessageLoop) {
|
if (g_WindowsEnableMessageLoop) {
|
||||||
@ -1549,7 +1549,7 @@ WIN_PumpEvents(_THIS)
|
|||||||
DispatchMessage(&msg);
|
DispatchMessage(&msg);
|
||||||
|
|
||||||
/* Make sure we don't busy loop here forever if there are lots of events coming in */
|
/* Make sure we don't busy loop here forever if there are lots of events coming in */
|
||||||
if (SDL_TICKS_PASSED(msg.time, start_ticks)) {
|
if (SDL_TICKS_PASSED(msg.time, end_ticks)) {
|
||||||
/* We might get a few new messages generated by the Steam overlay or other application hooks
|
/* We might get a few new messages generated by the Steam overlay or other application hooks
|
||||||
In this case those messages will be processed before any pending input, so we want to continue after those messages.
|
In this case those messages will be processed before any pending input, so we want to continue after those messages.
|
||||||
(thanks to Peter Deayton for his investigation here)
|
(thanks to Peter Deayton for his investigation here)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user