Added message for bad RetroAchievements token

Displays a different message at game launch if RetroAchievements fails specifically due to an invalid or expired API token, instructing the player to log back in with the game closed.
This commit is contained in:
LillyJadeKatrin 2025-08-08 18:06:04 -04:00
commit 373a237a8f

View file

@ -996,6 +996,16 @@ void AchievementManager::LoadGameCallback(int result, const char* error_message,
OSD::Color::RED);
return;
}
if (result == RC_LOGIN_REQUIRED || result == RC_INVALID_CREDENTIALS || result == RC_EXPIRED_TOKEN)
{
WARN_LOG_FMT(ACHIEVEMENTS, "Invalid/expired RetroAchievements API token.");
OSD::AddMessage(
"You have been logged out from RetroAchievements due to invalid/expired credentials.",
OSD::Duration::VERY_LONG, OSD::Color::RED);
OSD::AddMessage("Please close the game to log back in before continuing.",
OSD::Duration::VERY_LONG, OSD::Color::RED);
return;
}
auto* game = rc_client_get_game_info(client);
if (result == RC_OK)