Fix issue with AiUpdate

Some plugins like Jabo's needs this thread to be created each time
initiated.
This commit is contained in:
LegendOfDragoon 2015-09-01 08:16:42 -07:00
parent ec6a1e0c23
commit 8968430b04
1 changed files with 6 additions and 1 deletions

View File

@ -135,8 +135,13 @@ bool CAudioPlugin::Initiate(CN64System * System, CMainGui * RenderWindow)
if (System != NULL)
{
if (AiUpdate && !m_hAudioThread)
if (AiUpdate)
{
if (m_hAudioThread)
{
WriteTraceF(TraceAudio, __FUNCTION__ ": Terminate Audio Thread");
TerminateThread(m_hAudioThread, 0);
}
m_hAudioThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)AudioThread, (LPVOID)this, 0, &ThreadID);
}