Achievements: Don't leave boot blocked after an aborted login or load

rc_client doesn't call back for a game load aborted by unload, or for
anything pending when the client is destroyed. g_isIdentifying or
g_isLoggingIn then stayed set, and IsBlockingExecution kept every later
boot on a black screen until restart. Quitting during identification, or
disabling achievements during a token login, was enough.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-09-30 11:05:45 -06:00
1 parent 4509e9b460
commit ef08d06d02
1 file changed
+8
+8
View File
@@ -801,6 +801,9 @@ bool LoginAsync(const char *username, const char *password) {
void Logout() {
rc_client_logout(g_rcClient);
// An aborted login or game load doesn't always call back, so clear the flags here.
g_isLoggingIn = false;
g_isIdentifying = false;
// remove secret from config
NativeClearSecret(RA_TOKEN_SECRET_NAME);
g_Config.Save("Achievements logout");
@@ -832,6 +835,9 @@ bool Shutdown() {
g_rcClient = nullptr;
INFO_LOG(Log::Achievements, "Achievements shut down.");
}
// A destroyed client doesn't call back for pending logins or game loads.
g_isLoggingIn = false;
g_isIdentifying = false;
return true;
}
@@ -1157,6 +1163,8 @@ void UnloadGame() {
g_gamePath.clear();
s_game_hash.clear();
}
// Unloading aborts a pending load, and rc_client doesn't call back for an aborted load.
g_isIdentifying = false;
}
void change_media_callback(int result, const char *error_message, rc_client_t *client, void *userdata) {