diff --git a/ISLE/emscripten/events.cpp b/ISLE/emscripten/events.cpp index 67139dc6..5cf67e51 100644 --- a/ISLE/emscripten/events.cpp +++ b/ISLE/emscripten/events.cpp @@ -22,15 +22,15 @@ void Emscripten_SendEvent(const char* p_event, const char* p_json) } // clang-format on -void Emscripten_SendPresenterProgress(MxPresenter* p_presenter, MxPresenter::TickleState p_tickleState) +void Emscripten_SendPresenterProgress(MxDSAction* p_action, MxPresenter::TickleState p_tickleState) { char buf[128]; SDL_snprintf( buf, sizeof(buf), "{\"objectId\": %d, \"objectName\": \"%s\", \"tickleState\": %d}", - p_presenter->GetAction() ? p_presenter->GetAction()->GetObjectId() : 0, - p_presenter->GetAction() ? p_presenter->GetAction()->GetObjectName() : "", + p_action ? p_action->GetObjectId() : 0, + p_action ? p_action->GetObjectName() : "", p_tickleState ); diff --git a/ISLE/emscripten/events.h b/ISLE/emscripten/events.h index cf0b2ed6..fac59cad 100644 --- a/ISLE/emscripten/events.h +++ b/ISLE/emscripten/events.h @@ -3,6 +3,6 @@ #include "mxpresenter.h" -void Emscripten_SendPresenterProgress(MxPresenter* p_presenter, MxPresenter::TickleState p_tickleState); +void Emscripten_SendPresenterProgress(MxDSAction* p_action, MxPresenter::TickleState p_tickleState); #endif // EMSCRIPTEN_EVENTS_H diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index be4842e2..94eaba44 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -567,13 +567,12 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) } } else if (event->user.type == g_legoSdlEvents.m_presenterProgress) { - MxPresenter* presenter = static_cast(event->user.data1); - MxDSAction* action = presenter->GetAction(); + MxDSAction* action = static_cast(event->user.data1); MxPresenter::TickleState state = static_cast(event->user.code); #ifdef __EMSCRIPTEN__ if (!g_isle->GetGameStarted()) { - Emscripten_SendPresenterProgress(presenter, state); + Emscripten_SendPresenterProgress(action, state); } #endif diff --git a/LEGO1/omni/include/mxpresenter.h b/LEGO1/omni/include/mxpresenter.h index 0c24881e..c3b7a216 100644 --- a/LEGO1/omni/include/mxpresenter.h +++ b/LEGO1/omni/include/mxpresenter.h @@ -69,7 +69,7 @@ class MxPresenter : public MxCore { SDL_Event event; event.user.type = g_legoSdlEvents.m_presenterProgress; event.user.code = m_currentTickleState; - event.user.data1 = (void*) this; + event.user.data1 = (void*) m_action; SDL_PushEvent(&event); }