mirror of
https://github.com/spiffcode/hostile-takeover.git
synced 2026-05-12 18:29:37 -06:00
SDL host timestamp events when processed if necessary
This commit is contained in:
parent
94e319e1ee
commit
19d74d3da6
@ -183,7 +183,7 @@ void CheckTouchTracking() {
|
||||
}
|
||||
}
|
||||
|
||||
bool ProcessSdlEvent(Event *pevt)
|
||||
bool ProcessSdlEvent(base::Message *pmsg, Event *pevt)
|
||||
{
|
||||
memset(pevt, 0, sizeof(*pevt));
|
||||
SDL_Event event;
|
||||
@ -471,6 +471,10 @@ bool ProcessSdlEvent(Event *pevt)
|
||||
}
|
||||
#endif
|
||||
|
||||
pevt->ms = pmsg->ms;
|
||||
if (pevt->ms == 0)
|
||||
pevt->ms = HostGetMillisecondCount();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -543,7 +547,7 @@ bool HostGetEvent(Event *pevt, long ctWait)
|
||||
}
|
||||
|
||||
if (msg.id == kidmSdlEvent) {
|
||||
if (ProcessSdlEvent(pevt)) {
|
||||
if (ProcessSdlEvent(&msg, pevt)) {
|
||||
return true;
|
||||
}
|
||||
continue;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user