mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-27 01:45:37 -05:00
MxEventPresenter: AddToManager and small destroy cleanup (#269)
* MxEventPresenter: AddToManager and small destroy cleanup * Update mxeventpresenter.h * Update mxeventpresenter.h --------- Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
parent
33dcb139b7
commit
ca359e9002
2 changed files with 15 additions and 3 deletions
|
@ -24,11 +24,22 @@ void MxEventPresenter::Init()
|
||||||
m_unk50 = NULL;
|
m_unk50 = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// OFFSET: LEGO1 0x100c2db0
|
||||||
|
MxResult MxEventPresenter::AddToManager()
|
||||||
|
{
|
||||||
|
MxResult ret = FAILURE;
|
||||||
|
if (EventManager()) {
|
||||||
|
ret = SUCCESS;
|
||||||
|
EventManager()->AddPresenter(*this);
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
// OFFSET: LEGO1 0x100c2de0
|
// OFFSET: LEGO1 0x100c2de0
|
||||||
void MxEventPresenter::Destroy()
|
void MxEventPresenter::Destroy()
|
||||||
{
|
{
|
||||||
MxEventManager* eventManager = EventManager();
|
if (EventManager())
|
||||||
if (eventManager)
|
|
||||||
EventManager()->RemovePresenter(*this);
|
EventManager()->RemovePresenter(*this);
|
||||||
|
|
||||||
m_criticalSection.Enter();
|
m_criticalSection.Enter();
|
||||||
|
|
|
@ -24,7 +24,8 @@ class MxEventPresenter : public MxMediaPresenter {
|
||||||
return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name);
|
return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Destroy() override; // vtable+0x38
|
virtual MxResult AddToManager() override; // vtable+0x34
|
||||||
|
virtual void Destroy() override; // vtable+0x38
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Init();
|
void Init();
|
||||||
|
|
Loading…
Reference in a new issue