From 2bf6ebcb90801e73ee465b60ea745717f98bb1e5 Mon Sep 17 00:00:00 2001 From: LillyJadeKatrin Date: Tue, 3 Oct 2023 07:58:37 -0400 Subject: [PATCH] Added achievement hash to non-disc boot paths. --- Source/Core/Core/Boot/Boot.cpp | 6 ++++++ Source/Core/Core/IOS/ES/ES.cpp | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/Source/Core/Core/Boot/Boot.cpp b/Source/Core/Core/Boot/Boot.cpp index 5fc52585e0..725057ea52 100644 --- a/Source/Core/Core/Boot/Boot.cpp +++ b/Source/Core/Core/Boot/Boot.cpp @@ -25,6 +25,7 @@ #include "Common/MsgHandler.h" #include "Common/StringUtil.h" +#include "Core/AchievementManager.h" #include "Core/Boot/DolReader.h" #include "Core/Boot/ElfReader.h" #include "Core/CommonTitles.h" @@ -558,6 +559,11 @@ bool CBoot::BootUp(Core::System& system, const Core::CPUThreadGuard& guard, SetupGCMemory(system, guard); } +#ifdef USE_RETRO_ACHIEVEMENTS + AchievementManager::GetInstance()->HashGame(executable.path, + [](AchievementManager::ResponseType r_type) {}); +#endif // USE_RETRO_ACHIEVEMENTS + if (!executable.reader->LoadIntoMemory(system)) { PanicAlertFmtT("Failed to load the executable to memory."); diff --git a/Source/Core/Core/IOS/ES/ES.cpp b/Source/Core/Core/IOS/ES/ES.cpp index af30cd6765..4771115ce1 100644 --- a/Source/Core/Core/IOS/ES/ES.cpp +++ b/Source/Core/Core/IOS/ES/ES.cpp @@ -16,6 +16,7 @@ #include "Common/NandPaths.h" #include "Common/ScopeGuard.h" #include "Common/StringUtil.h" +#include "Core/AchievementManager.h" #include "Core/CommonTitles.h" #include "Core/ConfigManager.h" #include "Core/Core.h" @@ -476,6 +477,12 @@ bool ESDevice::LaunchPPCTitle(u64 title_id) if (!Core::IsRunningAndStarted()) return BootstrapPPC(); +#ifdef USE_RETRO_ACHIEVEMENTS + INFO_LOG_FMT(ACHIEVEMENTS, + "WAD and NAND formats not currently supported by Achievement Manager."); + AchievementManager::GetInstance()->SetDisabled(true); +#endif // USE_RETRO_ACHIEVEMENTS + core_timing.RemoveEvent(s_bootstrap_ppc_for_launch_event); core_timing.ScheduleEvent(ticks, s_bootstrap_ppc_for_launch_event); return true;