mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-19 01:10:39 +02:00
RetroAchievements: Only apply Hardcore restrictions if the game is recognized
This commit is contained in:
1 parent
0f262d5bd8
commit
cd24f4e5b5
1 file changed
+14
-14
+14
-14
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user