[client] fix reversed event timestamp logic

This commit is contained in:
Geoffrey McRae
2026-07-16 19:43:02 +10:00
parent 5e6d88f382
commit 97d43f17b6

View File

@@ -102,7 +102,7 @@ void lgMessage_process(void)
case LG_MSG_WINDOWSIZE: case LG_MSG_WINDOWSIZE:
{ {
// retain the last/latest windowsize event // retain the last/latest windowsize event
if (!windowSize || windowSize->timestamp > event->timestamp) if (!windowSize || event->timestamp > windowSize->timestamp)
{ {
free(windowSize); free(windowSize);
windowSize = event; windowSize = event;
@@ -135,14 +135,14 @@ void lgMessage_process(void)
} }
else else
{ {
if (event->msg.windowSize.width != this.lastWindowSize.width || if (windowSize->msg.windowSize.width != this.lastWindowSize.width ||
event->msg.windowSize.height != this.lastWindowSize.height) windowSize->msg.windowSize.height != this.lastWindowSize.height)
{ {
this.lastWindowSize.width = event->msg.windowSize.width; this.lastWindowSize.width = windowSize->msg.windowSize.width;
this.lastWindowSize.height = event->msg.windowSize.height; this.lastWindowSize.height = windowSize->msg.windowSize.height;
core_onWindowSizeChanged( core_onWindowSizeChanged(
event->msg.windowSize.width, windowSize->msg.windowSize.width,
event->msg.windowSize.height); windowSize->msg.windowSize.height);
} }
free(windowSize); free(windowSize);
} }