mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 16:49:58 -06:00
DVDInterface: Remove GetVolume
For thread safety reasons, the currently inserted volume must only be accessed by the DVD thread (or by the CPU thread if it calls DVDThread::WaitUntilIdle() first). After this commit, only DVDThread.cpp can access the volume, which prevents code in other files from accessing the volume in a non-threadsafe way.
This commit is contained in:
@ -120,13 +120,6 @@ static void ReinitHardware()
|
||||
SystemTimers::ChangePPCClock(SystemTimers::Mode::GC);
|
||||
}
|
||||
|
||||
static void UpdateRunningGame()
|
||||
{
|
||||
DVDThread::WaitUntilIdle();
|
||||
SConfig::GetInstance().m_BootType = SConfig::BOOT_MIOS;
|
||||
SConfig::GetInstance().SetRunningGameMetadata(DVDInterface::GetVolume());
|
||||
}
|
||||
|
||||
constexpr u32 ADDRESS_INIT_SEMAPHORE = 0x30f8;
|
||||
|
||||
bool Load()
|
||||
@ -176,7 +169,8 @@ bool Load()
|
||||
|
||||
Memory::Write_U32(0x00000000, ADDRESS_INIT_SEMAPHORE);
|
||||
NOTICE_LOG(IOS, "IPL ready.");
|
||||
UpdateRunningGame();
|
||||
SConfig::GetInstance().m_BootType = SConfig::BOOT_MIOS;
|
||||
DVDThread::UpdateRunningGameMetadata();
|
||||
return true;
|
||||
}
|
||||
} // namespace MIOS
|
||||
|
Reference in New Issue
Block a user