Remove AchievementManager ChangeDisc call from Eject

This was causing the achievement runtime to shutdown in the middle
of a disc change even if the resulting disc was valid, which was
causing achievements like the ones in Resident Evil for completing
the entire game in a single session to break midway through.

Also adds a log to notify the user when the disc change is invalid
(e.g. different game inserted).
This commit is contained in:
Lilly Jade Katrin 2026-03-20 21:37:09 -04:00
parent 12935d5b25
commit 529b696fcb
2 changed files with 2 additions and 1 deletions

View File

@ -168,6 +168,8 @@ void AchievementManager::LoadGame(const DiscIO::Volume* volume)
WARN_LOG_FMT(ACHIEVEMENTS, "Software format unsupported by AchievementManager.");
if (rc_client_get_game_info(m_client))
{
OSD::AddMessage("Unsupported media change; disabling achievements.", OSD::Duration::VERY_LONG,
OSD::Color::RED);
CloseGame();
}
else

View File

@ -442,7 +442,6 @@ void DVDInterface::AutoChangeDiscCallback(Core::System& system, u64 userdata, s6
void DVDInterface::EjectDiscCallback(Core::System& system, u64 userdata, s64 cyclesLate)
{
AchievementManager::GetInstance().ChangeDisc(nullptr);
system.GetDVDInterface().SetDisc(nullptr, {});
}