mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-02-12 09:14:52 +00:00
RetroAchievements - Fix Aliases
It turns out that it is possible to create a login alias in RetroAchievements such that you can log in with a username that doesn't match your display name. AchievementManager was treating this as a synchronization error, but this is desired behavior, so this removes the check.
This commit is contained in:
parent
bb7e011673
commit
18f8ed6588
@ -931,22 +931,8 @@ void AchievementManager::LoginCallback(int result, const char* error_message, rc
|
||||
std::string config_username = Config::Get(Config::RA_USERNAME);
|
||||
if (config_username != user->username)
|
||||
{
|
||||
if (Common::CaseInsensitiveEquals(config_username, user->username))
|
||||
{
|
||||
INFO_LOG_FMT(ACHIEVEMENTS,
|
||||
"Case mismatch between site {} and local {}; updating local config.",
|
||||
user->username, Config::Get(Config::RA_USERNAME));
|
||||
Config::SetBaseOrCurrent(Config::RA_USERNAME, user->username);
|
||||
}
|
||||
else
|
||||
{
|
||||
INFO_LOG_FMT(ACHIEVEMENTS, "Attempted to login prior user {}; current user is {}.",
|
||||
user->username, Config::Get(Config::RA_USERNAME));
|
||||
rc_client_logout(client);
|
||||
instance.update_event.Trigger({.failed_login_code = RC_INVALID_STATE});
|
||||
instance.login_event.Trigger(RC_INVALID_STATE);
|
||||
return;
|
||||
}
|
||||
INFO_LOG_FMT(ACHIEVEMENTS, "Username alias {} -> {}.", config_username, user->username);
|
||||
Config::SetBaseOrCurrent(Config::RA_USERNAME, user->username);
|
||||
}
|
||||
instance.login_event.Trigger(RC_OK);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user