Added achievement hash to non-disc boot paths.

This commit is contained in:
LillyJadeKatrin 2023-10-03 07:58:37 -04:00
parent ebf2ef1d82
commit 2bf6ebcb90
2 changed files with 13 additions and 0 deletions

View file

@ -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.");

View file

@ -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;