diff --git a/Source/Core/Core/HW/DVD/DVDInterface.cpp b/Source/Core/Core/HW/DVD/DVDInterface.cpp index b335be618c..f83aa54bbc 100644 --- a/Source/Core/Core/HW/DVD/DVDInterface.cpp +++ b/Source/Core/Core/HW/DVD/DVDInterface.cpp @@ -1039,7 +1039,8 @@ void ExecuteCommand(u32 command_0, u32 command_1, u32 command_2, u32 output_addr INFO_LOG(DVDINTERFACE, "DVDLowStopMotor %s %s", command_1 ? "eject" : "", command_2 ? "kill!" : ""); - bool auto_disc_change = Config::Get(Config::MAIN_AUTO_DISC_CHANGE) && !Movie::IsPlayingInput(); + bool auto_disc_change = Config::Get(Config::MAIN_AUTO_DISC_CHANGE) && + !Movie::IsPlayingInput() && DVDThread::IsInsertedDiscRunning(); if (auto_disc_change) auto_disc_change = AutoChangeDisc(); if (auto_disc_change) diff --git a/Source/Core/Core/HW/DVD/DVDThread.cpp b/Source/Core/Core/HW/DVD/DVDThread.cpp index 3693bb9fe3..27f6df8be6 100644 --- a/Source/Core/Core/HW/DVD/DVDThread.cpp +++ b/Source/Core/Core/HW/DVD/DVDThread.cpp @@ -216,6 +216,16 @@ IOS::ES::TicketReader GetTicket(const DiscIO::Partition& partition) return s_disc->GetTicket(partition); } +bool IsInsertedDiscRunning() +{ + if (!s_disc) + return false; + + WaitUntilIdle(); + + return SConfig::GetInstance().GetGameID() == s_disc->GetGameID(); +} + bool UpdateRunningGameMetadata(const DiscIO::Partition& partition, std::optional title_id) { if (!s_disc) diff --git a/Source/Core/Core/HW/DVD/DVDThread.h b/Source/Core/Core/HW/DVD/DVDThread.h index 3a158cad1c..cdf066cc46 100644 --- a/Source/Core/Core/HW/DVD/DVDThread.h +++ b/Source/Core/Core/HW/DVD/DVDThread.h @@ -47,6 +47,7 @@ DiscIO::Platform GetDiscType(); u64 PartitionOffsetToRawOffset(u64 offset, const DiscIO::Partition& partition); IOS::ES::TMDReader GetTMD(const DiscIO::Partition& partition); IOS::ES::TicketReader GetTicket(const DiscIO::Partition& partition); +bool IsInsertedDiscRunning(); // This function returns true and calls SConfig::SetRunningGameMetadata(Volume&, Partition&) // if both of the following conditions are true: // - A disc is inserted