Skip to content

Commit

Permalink
Added achievement hash to non-disc boot paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
LillyJadeKatrin committed Oct 4, 2023
1 parent f0d39d8 commit f15e1c1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Source/Core/Core/Boot/Boot.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -555,6 +556,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.");
Expand Down
6 changes: 6 additions & 0 deletions Source/Core/Core/IOS/ES/ES.cpp
Expand Up @@ -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"
Expand Down Expand Up @@ -476,6 +477,11 @@ bool ESDevice::LaunchPPCTitle(u64 title_id)
if (!Core::IsRunningAndStarted())
return BootstrapPPC();

#ifdef USE_RETRO_ACHIEVEMENTS
AchievementManager::GetInstance()->HashGame(m_pending_ppc_boot_content_path,
[](AchievementManager::ResponseType r_type) {});
#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;
Expand Down

0 comments on commit f15e1c1

Please sign in to comment.