diff --git a/src/xenia/kernel/xam/achievement_backends/gpd_achievement_backend.cc b/src/xenia/kernel/xam/achievement_backends/gpd_achievement_backend.cc index 8cbc1a37e..e7903ce1e 100644 --- a/src/xenia/kernel/xam/achievement_backends/gpd_achievement_backend.cc +++ b/src/xenia/kernel/xam/achievement_backends/gpd_achievement_backend.cc @@ -72,6 +72,10 @@ bool GpdAchievementBackend::IsAchievementUnlocked( const auto achievement = GetAchievementInfoInternal(xuid, title_id, achievement_id); + if (!achievement) { + return false; + } + return (achievement->flags & static_cast(AchievementFlags::kAchieved)) != 0; } diff --git a/src/xenia/kernel/xam/profile_manager.cc b/src/xenia/kernel/xam/profile_manager.cc index b0cb38ea1..acd76f547 100644 --- a/src/xenia/kernel/xam/profile_manager.cc +++ b/src/xenia/kernel/xam/profile_manager.cc @@ -314,6 +314,15 @@ void ProfileManager::Login(const uint64_t xuid, const uint8_t user_index, logged_profiles_[assigned_user_slot] = std::make_unique(xuid, &profile); + + if (kernel_state_->emulator()->is_title_open()) { + const kernel::util::XdbfGameData db = kernel_state_->title_xdbf(); + if (db.is_valid()) { + kernel_state_->xam_state()->achievement_manager()->LoadTitleAchievements( + xuid, db); + } + } + if (notify) { kernel_state_->BroadcastNotification(kXNotificationIDSystemSignInChanged, GetUsedUserSlots().to_ulong());