mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-26 17:36:12 -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;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c2db0
|
||||
MxResult MxEventPresenter::AddToManager()
|
||||
{
|
||||
MxResult ret = FAILURE;
|
||||
if (EventManager()) {
|
||||
ret = SUCCESS;
|
||||
EventManager()->AddPresenter(*this);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c2de0
|
||||
void MxEventPresenter::Destroy()
|
||||
{
|
||||
MxEventManager* eventManager = EventManager();
|
||||
if (eventManager)
|
||||
if (EventManager())
|
||||
EventManager()->RemovePresenter(*this);
|
||||
|
||||
m_criticalSection.Enter();
|
||||
|
|
|
@ -24,6 +24,7 @@ class MxEventPresenter : public MxMediaPresenter {
|
|||
return !strcmp(name, MxEventPresenter::ClassName()) || MxMediaPresenter::IsA(name);
|
||||
}
|
||||
|
||||
virtual MxResult AddToManager() override; // vtable+0x34
|
||||
virtual void Destroy() override; // vtable+0x38
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue