mirror of https://github.com/PCSX2/pcsx2.git
CDVD: fix ISO swapping (#3788)
This commit is contained in:
parent
2c717c3cdb
commit
f30b66522f
|
@ -42,6 +42,8 @@
|
|||
|
||||
#include "x86emitter/x86_intrin.h"
|
||||
|
||||
bool g_CDVDReset = false;
|
||||
|
||||
// --------------------------------------------------------------------------------------
|
||||
// SysCoreThread *External Thread* Implementations
|
||||
// (Called from outside the context of this thread)
|
||||
|
@ -307,7 +309,7 @@ void SysCoreThread::OnSuspendInThread()
|
|||
void SysCoreThread::OnResumeInThread(bool isSuspended)
|
||||
{
|
||||
GetCorePlugins().Open();
|
||||
if (isSuspended || !g_GameStarted)
|
||||
if (isSuspended)
|
||||
DoCDVDopen();
|
||||
FWopen();
|
||||
SPU2open((void*)pDsp);
|
||||
|
|
|
@ -314,7 +314,8 @@ bool SysThreadBase::StateCheckInThread()
|
|||
m_RunningLock.Acquire();
|
||||
if( m_ExecMode != ExecMode_Closing )
|
||||
{
|
||||
OnResumeInThread( false );
|
||||
OnResumeInThread( g_CDVDReset );
|
||||
g_CDVDReset = false;
|
||||
break;
|
||||
}
|
||||
m_sem_ChangingExecMode.Post();
|
||||
|
|
|
@ -265,3 +265,5 @@ protected:
|
|||
// them to extend the class and override virtual methods).
|
||||
//
|
||||
extern SysCoreThread& GetCoreThread();
|
||||
|
||||
extern bool g_CDVDReset;
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#include "GS.h"
|
||||
#include "GSFrame.h"
|
||||
#include "SPU2/spu2.h"
|
||||
#include "System/SysThreads.h"
|
||||
|
||||
#include "ConsoleLogger.h"
|
||||
#include "MainFrame.h"
|
||||
|
@ -164,6 +165,7 @@ wxWindowID SwapOrReset_Iso(wxWindow* owner, IScopedCoreThread& core_control, con
|
|||
}
|
||||
}
|
||||
|
||||
g_CDVDReset = true;
|
||||
g_Conf->CdvdSource = CDVD_SourceType::Iso;
|
||||
SysUpdateIsoSrcFile(isoFilename);
|
||||
|
||||
|
@ -258,6 +260,7 @@ wxWindowID SwapOrReset_CdvdSrc(wxWindow* owner, CDVD_SourceType newsrc)
|
|||
}
|
||||
}
|
||||
|
||||
g_CDVDReset = true;
|
||||
CDVD_SourceType oldsrc = g_Conf->CdvdSource;
|
||||
g_Conf->CdvdSource = newsrc;
|
||||
|
||||
|
|
Loading…
Reference in New Issue