diff --git a/Core/RetroAchievements.cpp b/Core/RetroAchievements.cpp index 3478d8fda9..809c0cfa89 100644 --- a/Core/RetroAchievements.cpp +++ b/Core/RetroAchievements.cpp @@ -104,6 +104,19 @@ bool IsLoggedIn() { return rc_client_get_user_info(g_rcClient) != nullptr && !g_isLoggingIn; } +// This is the RetroAchievements game ID, rather than the PSP game ID. +static u32 GetGameID() { + if (!g_rcClient) { + return 0; + } + + const rc_client_game_t *info = rc_client_get_game_info(g_rcClient); + if (!info) { + return 0; + } + return info->id; // 0 if not identified +} + bool EncoreModeActive() { if (!g_rcClient) { return false; @@ -122,7 +135,7 @@ bool ChallengeModeActive() { if (!g_rcClient) { return false; } - return IsLoggedIn() && rc_client_get_hardcore_enabled(g_rcClient); + return IsLoggedIn() && rc_client_get_hardcore_enabled(g_rcClient) && GetGameID(); } bool WarnUserIfChallengeModeActive(bool isSaveStateAction, const char *message) { @@ -148,19 +161,6 @@ bool IsBlockingExecution() { return g_isLoggingIn || g_isIdentifying; } -// This is the RetroAchievements game ID, rather than the PSP game ID. -static u32 GetGameID() { - if (!g_rcClient) { - return 0; - } - - const rc_client_game_t *info = rc_client_get_game_info(g_rcClient); - if (!info) { - return 0; - } - return info->id; // 0 if not identified -} - bool IsActive() { return GetGameID() != 0; }