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:
@@ -168,6 +168,8 @@ void AchievementManager::LoadGame(const DiscIO::Volume* volume)
|
|||||||
WARN_LOG_FMT(ACHIEVEMENTS, "Software format unsupported by AchievementManager.");
|
WARN_LOG_FMT(ACHIEVEMENTS, "Software format unsupported by AchievementManager.");
|
||||||
if (rc_client_get_game_info(m_client))
|
if (rc_client_get_game_info(m_client))
|
||||||
{
|
{
|
||||||
|
OSD::AddMessage("Unsupported media change; disabling achievements.", OSD::Duration::VERY_LONG,
|
||||||
|
OSD::Color::RED);
|
||||||
CloseGame();
|
CloseGame();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -442,7 +442,6 @@ void DVDInterface::AutoChangeDiscCallback(Core::System& system, u64 userdata, s6
|
|||||||
|
|
||||||
void DVDInterface::EjectDiscCallback(Core::System& system, u64 userdata, s64 cyclesLate)
|
void DVDInterface::EjectDiscCallback(Core::System& system, u64 userdata, s64 cyclesLate)
|
||||||
{
|
{
|
||||||
AchievementManager::GetInstance().ChangeDisc(nullptr);
|
|
||||||
system.GetDVDInterface().SetDisc(nullptr, {});
|
system.GetDVDInterface().SetDisc(nullptr, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user