mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-06-18 15:34:09 +00:00
SDL_Event::timestamp must be initialized to zero or current time. Zero the complete struct to be safe.
This commit is contained in:
parent
fdbe9a8705
commit
7752603257
@ -200,7 +200,7 @@ class LegoOmni : public MxOmni {
|
|||||||
quit.type = SDL_EVENT_QUIT;
|
quit.type = SDL_EVENT_QUIT;
|
||||||
quit.timestamp = SDL_GetTicksNS();
|
quit.timestamp = SDL_GetTicksNS();
|
||||||
|
|
||||||
SDL_Event event;
|
SDL_Event event = {};
|
||||||
event.quit = quit;
|
event.quit = quit;
|
||||||
|
|
||||||
SDL_PushEvent(&event);
|
SDL_PushEvent(&event);
|
||||||
|
|||||||
@ -592,7 +592,7 @@ void EnableAnimations(MxBool p_enable)
|
|||||||
// FUNCTION: LEGO1 0x1003ef40
|
// FUNCTION: LEGO1 0x1003ef40
|
||||||
void SetAppCursor(Cursor p_cursor)
|
void SetAppCursor(Cursor p_cursor)
|
||||||
{
|
{
|
||||||
SDL_Event event;
|
SDL_Event event = {};
|
||||||
event.user.type = g_legoSdlEvents.m_windowsMessage;
|
event.user.type = g_legoSdlEvents.m_windowsMessage;
|
||||||
event.user.code = WM_ISLE_SETCURSOR;
|
event.user.code = WM_ISLE_SETCURSOR;
|
||||||
event.user.data1 = (void*) p_cursor;
|
event.user.data1 = (void*) p_cursor;
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class MxPresenter : public MxCore {
|
|||||||
m_previousTickleStates |= 1 << (MxU8) m_currentTickleState;
|
m_previousTickleStates |= 1 << (MxU8) m_currentTickleState;
|
||||||
m_currentTickleState = p_tickleState;
|
m_currentTickleState = p_tickleState;
|
||||||
|
|
||||||
SDL_Event event;
|
SDL_Event event = {};
|
||||||
event.user.type = g_legoSdlEvents.m_presenterProgress;
|
event.user.type = g_legoSdlEvents.m_presenterProgress;
|
||||||
event.user.code = m_currentTickleState;
|
event.user.code = m_currentTickleState;
|
||||||
event.user.data1 = (void*) m_action;
|
event.user.data1 = (void*) m_action;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user