Skip to content
Browse files

Don't do automatic disc switching when running e.g. the Wii Menu

We only want automatic disc switching to happen when the game actually
is running, but software like the Wii Menu also uses DVDLowStopMotor.
  • Loading branch information...
JosJuice committed Dec 20, 2018
1 parent bd665aa commit b608e80d8e5b3b99249b156369b9ceb1db4ad3d7
@@ -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)
@@ -216,6 +216,16 @@ IOS::ES::TicketReader GetTicket(const DiscIO::Partition& partition)
return s_disc->GetTicket(partition);

bool IsInsertedDiscRunning()
if (!s_disc)
return false;


return SConfig::GetInstance().GetGameID() == s_disc->GetGameID();

bool UpdateRunningGameMetadata(const DiscIO::Partition& partition, std::optional<u64> title_id)
if (!s_disc)
@@ -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

0 comments on commit b608e80

Please sign in to comment.
You can’t perform that action at this time.