DVDInterface: Modernize With CPUThreadGuard

This commit is contained in:
mitaclaw
2024-03-04 16:45:25 -08:00
parent 8f6fd912f7
commit fe61efcd7a
7 changed files with 39 additions and 32 deletions

View File

@ -1254,13 +1254,12 @@ void MovieManager::PlayController(GCPadStatus* PadStatus, int controllerID)
if (m_pad_state.disc)
{
Core::RunAsCPUThread([this] {
if (!m_system.GetDVDInterface().AutoChangeDisc())
{
m_system.GetCPU().Break();
PanicAlertFmtT("Change the disc to {0}", m_disc_change_filename);
}
});
const Core::CPUThreadGuard guard(m_system);
if (!m_system.GetDVDInterface().AutoChangeDisc(guard))
{
m_system.GetCPU().Break();
PanicAlertFmtT("Change the disc to {0}", m_disc_change_filename);
}
}
if (m_pad_state.reset)