Fixed dsp lle thread never starting because of dspjit initialization happening after the dsp thread check
This commit is contained in:
parent
a2c4abcae8
commit
e2060525bc
|
@ -172,10 +172,6 @@ static bool FillDSPInitOptions(DSPInitOptions* opts)
|
||||||
|
|
||||||
bool DSPLLE::Initialize(bool bWii, bool bDSPThread)
|
bool DSPLLE::Initialize(bool bWii, bool bDSPThread)
|
||||||
{
|
{
|
||||||
m_bWii = bWii;
|
|
||||||
m_bDSPThread = true;
|
|
||||||
if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() || Core::g_want_determinism || !bDSPThread || !dspjit)
|
|
||||||
m_bDSPThread = false;
|
|
||||||
requestDisableThread = false;
|
requestDisableThread = false;
|
||||||
|
|
||||||
DSPInitOptions opts;
|
DSPInitOptions opts;
|
||||||
|
@ -184,6 +180,15 @@ bool DSPLLE::Initialize(bool bWii, bool bDSPThread)
|
||||||
if (!DSPCore_Init(opts))
|
if (!DSPCore_Init(opts))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// needs to be after DSPCore_Init for the dspjit ptr
|
||||||
|
if (NetPlay::IsNetPlayRunning() || Movie::IsMovieActive() ||
|
||||||
|
Core::g_want_determinism || !dspjit)
|
||||||
|
{
|
||||||
|
bDSPThread = false;
|
||||||
|
}
|
||||||
|
m_bWii = bWii;
|
||||||
|
m_bDSPThread = bDSPThread;
|
||||||
|
|
||||||
// DSPLLE directly accesses the fastmem arena.
|
// DSPLLE directly accesses the fastmem arena.
|
||||||
// TODO: The fastmem arena is only supposed to be used by the JIT:
|
// TODO: The fastmem arena is only supposed to be used by the JIT:
|
||||||
// among other issues, its size is only 1GB on 32-bit targets.
|
// among other issues, its size is only 1GB on 32-bit targets.
|
||||||
|
@ -192,14 +197,13 @@ bool DSPLLE::Initialize(bool bWii, bool bDSPThread)
|
||||||
|
|
||||||
InitInstructionTable();
|
InitInstructionTable();
|
||||||
|
|
||||||
if (m_bDSPThread)
|
if (bDSPThread)
|
||||||
{
|
{
|
||||||
m_bIsRunning.Set(true);
|
m_bIsRunning.Set(true);
|
||||||
m_hDSPThread = std::thread(DSPThread, this);
|
m_hDSPThread = std::thread(DSPThread, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Host_RefreshDSPDebuggerWindow();
|
Host_RefreshDSPDebuggerWindow();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue