Implement/match MxMediaManager::StopPresenters

This commit is contained in:
Christian Semmler 2023-09-14 11:49:44 -04:00
parent 9e8f8b0f60
commit 68ac78ae03
2 changed files with 19 additions and 3 deletions

View File

@ -101,6 +101,18 @@ class MxListCursor : public MxCore
m_list->m_count--; m_list->m_count--;
m_match = NULL; m_match = NULL;
} }
MxBool Next(T*& p_obj) {
if (!m_match)
m_match = m_list->m_first;
else
m_match = m_match->m_next;
if (m_match)
p_obj = m_match->m_obj;
return m_match != NULL;
}
private: private:
MxList<T> *m_list; MxList<T> *m_list;
MxListEntry<T> *m_match; MxListEntry<T> *m_match;

View File

@ -1,5 +1,6 @@
#include "mxmediamanager.h" #include "mxmediamanager.h"
#include "mxautolocker.h" #include "mxautolocker.h"
#include "mxpresenter.h"
#include "decomp.h" #include "decomp.h"
DECOMP_SIZE_ASSERT(MxMediaManager, 0x2c); DECOMP_SIZE_ASSERT(MxMediaManager, 0x2c);
@ -76,10 +77,13 @@ void MxMediaManager::RemovePresenter(MxPresenter &p_presenter)
cursor.Detach(); cursor.Detach();
} }
// OFFSET: LEGO1 0x100b8ac0 STUB // OFFSET: LEGO1 0x100b8ac0
void MxMediaManager::StopPresenters() void MxMediaManager::StopPresenters()
{ {
MxAutoLocker lock(&this->m_criticalSection); MxAutoLocker lock(&this->m_criticalSection);
MxPresenter *presenter;
// Call EndAction on all presenters in list MxPresenterListCursor cursor(this->m_presenters);
while (cursor.Next(presenter))
presenter->EndAction();
} }