Fix threading problem with AiUpdate
When you reset a game or switch to another game, it keep creating a new thread even if one already exists. This can cause the emulator to crash.
This commit is contained in:
parent
f5c7fa3bf8
commit
03dae91dc8
|
@ -135,7 +135,7 @@ bool CAudioPlugin::Initiate(CN64System * System, CMainGui * RenderWindow)
|
|||
|
||||
if (System != NULL)
|
||||
{
|
||||
if (AiUpdate)
|
||||
if (AiUpdate && !m_hAudioThread)
|
||||
{
|
||||
m_hAudioThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AudioThread, (LPVOID)this, 0, &ThreadID);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue