SDL_Event::timestamp must be initialized to zero or current time. Zero the complete struct to be safe.

This commit is contained in:
Anonymous Maarten 2026-05-15 20:59:53 +02:00
parent fdbe9a8705
commit 7752603257
3 changed files with 3 additions and 3 deletions

View File

@ -200,7 +200,7 @@ class LegoOmni : public MxOmni {
quit.type = SDL_EVENT_QUIT;
quit.timestamp = SDL_GetTicksNS();
SDL_Event event;
SDL_Event event = {};
event.quit = quit;
SDL_PushEvent(&event);

View File

@ -592,7 +592,7 @@ void EnableAnimations(MxBool p_enable)
// FUNCTION: LEGO1 0x1003ef40
void SetAppCursor(Cursor p_cursor)
{
SDL_Event event;
SDL_Event event = {};
event.user.type = g_legoSdlEvents.m_windowsMessage;
event.user.code = WM_ISLE_SETCURSOR;
event.user.data1 = (void*) p_cursor;

View File

@ -66,7 +66,7 @@ class MxPresenter : public MxCore {
m_previousTickleStates |= 1 << (MxU8) m_currentTickleState;
m_currentTickleState = p_tickleState;
SDL_Event event;
SDL_Event event = {};
event.user.type = g_legoSdlEvents.m_presenterProgress;
event.user.code = m_currentTickleState;
event.user.data1 = (void*) m_action;