MxOmni::Create 100% match, make Create calls consistent (#211)

* Improve MxOmni::Create match, make Create calls consistent

* Match MxEventManager::Create

* Fix MxTickleClientPtrList

* 100% match

* Update mxomnicreateparam.h
This commit is contained in:
Christian Semmler
2023-10-14 20:49:07 -04:00
committed by GitHub
parent 0c8705a9df
commit 37e75703d4
15 changed files with 74 additions and 107 deletions

View File

@@ -37,29 +37,28 @@ void MxEventManager::Destroy(MxBool p_fromDestructor)
}
// OFFSET: LEGO1 0x100c04a0
MxResult MxEventManager::CreateEventThread(MxU32 p_frequencyMS, MxBool p_noRegister)
MxResult MxEventManager::Create(MxU32 p_frequencyMS, MxBool p_createThread)
{
MxResult status = FAILURE;
MxBool locked = FALSE;
MxResult result = MxMediaManager::InitPresenters();
if (result == SUCCESS) {
if (p_noRegister) {
if (p_createThread) {
this->m_criticalSection.Enter();
locked = TRUE;
this->m_thread = new MxTickleThread(this, p_frequencyMS);
if (this->m_thread) {
if (this->m_thread->Start(0, 0) == SUCCESS)
status = SUCCESS;
}
if (!this->m_thread || this->m_thread->Start(0, 0) != SUCCESS)
goto done;
}
else {
else
TickleManager()->RegisterClient(this, p_frequencyMS);
status = SUCCESS;
}
status = SUCCESS;
}
done:
if (status != SUCCESS)
Destroy();