mirror of
https://github.com/isledecomp/isle.git
synced 2025-12-10 16:13:02 +00:00
Implement MxVideoManager::vtable0x28 and Create (#208)
* MxVideoManager::Destroy / destructor * Consistency * Add missing override * Implement MxVideoManager::vtable28 * Implement vtable2c * Rename to Create
This commit is contained in:
committed by
GitHub
parent
e08717f496
commit
e4f87ad7dd
@@ -120,44 +120,32 @@ void MxMusicManager::SetVolume(MxS32 p_volume)
|
||||
}
|
||||
|
||||
// OFFSET: LEGO1 0x100c0840
|
||||
MxResult MxMusicManager::StartMIDIThread(MxU32 p_frequencyMS, MxBool p_noRegister)
|
||||
MxResult MxMusicManager::StartMIDIThread(MxU32 p_frequencyMS, MxBool p_createThread)
|
||||
{
|
||||
MxResult status = FAILURE;
|
||||
MxBool locked = FALSE;
|
||||
|
||||
MxResult result = MxAudioManager::InitPresenters();
|
||||
if (result == SUCCESS)
|
||||
{
|
||||
if (p_noRegister)
|
||||
{
|
||||
if (MxAudioManager::InitPresenters() == SUCCESS) {
|
||||
if (p_createThread) {
|
||||
m_criticalSection.Enter();
|
||||
locked = TRUE;
|
||||
m_thread = new MxTickleThread(this, p_frequencyMS);
|
||||
|
||||
if (m_thread)
|
||||
{
|
||||
if (m_thread->Start(0, 0) == SUCCESS)
|
||||
{
|
||||
status = SUCCESS;
|
||||
}
|
||||
}
|
||||
if (!m_thread || m_thread->Start(0, 0) != SUCCESS)
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
{
|
||||
TickleManager()->RegisterClient(this, p_frequencyMS);
|
||||
status = SUCCESS;
|
||||
}
|
||||
|
||||
status = SUCCESS;
|
||||
}
|
||||
|
||||
done:
|
||||
if (status != SUCCESS)
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
if (locked)
|
||||
{
|
||||
m_criticalSection.Leave();
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
Reference in New Issue
Block a user