From 78d700af413c9398763f846b75e1c3ac00fbd634 Mon Sep 17 00:00:00 2001 From: The-Little-Wolf <116989599+The-Little-Wolf@users.noreply.github.com> Date: Fri, 16 Jan 2026 15:19:46 -0800 Subject: [PATCH] [XAM/USER] - Add missing broadcast to XamUserWriteProfileSettings - Add missing broadcast to XamUserWriteProfileSettings --- src/xenia/kernel/xam/xam_user.cc | 14 ++++++++++++++ src/xenia/xbox.h | 12 ++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index 055cc23b8..1092b30a0 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -356,6 +356,8 @@ dword_result_t XamUserWriteProfileSettings_entry( } auto run = [=](uint32_t& extended_error, uint32_t& length) { + bool was_avatar_setting_changed = false; + const uint8_t user_index_bit = (1 << user_index) & 0xF; // Update and save settings. const auto& user_profile = kernel_state()->xam_state()->GetUserProfile(user_index); @@ -369,6 +371,11 @@ dword_result_t XamUserWriteProfileSettings_entry( for (uint32_t n = 0; n < setting_count; ++n) { const UserSetting setting = UserSetting(&settings[n]); + if (setting.get_setting_id() == + static_cast( + UserSettingId::XPROFILE_GAMERCARD_AVATAR_INFO_1)) { + was_avatar_setting_changed = true; + } if (!setting.is_valid_type()) { continue; @@ -378,6 +385,13 @@ dword_result_t XamUserWriteProfileSettings_entry( user_profile->xuid(), title_id, &setting); } + kernel_state()->BroadcastNotification( + kXNotificationSystemProfileSettingChanged, user_index_bit); + if (was_avatar_setting_changed) { + kernel_state()->BroadcastNotification(kXNotificationSystemAvatarChanged, + user_index_bit); + } + extended_error = X_HRESULT_FROM_WIN32(X_STATUS_SUCCESS); length = 0; return X_STATUS_SUCCESS; diff --git a/src/xenia/xbox.h b/src/xenia/xbox.h index 876dc9ff4..09681cb7f 100644 --- a/src/xenia/xbox.h +++ b/src/xenia/xbox.h @@ -196,11 +196,6 @@ enum : XNotificationID { kXNotificationSystemUI = 0x00000009, kXNotificationSystemSignInChanged = 0x0000000A, kXNotificationSystemStorageDevicesChanged = 0x0000000B, - kXNotificationSystemDashContextChanged = 0x8000000C, - kXNotificationSystemTrayStateChanged = 0x8000000D, - kXNotificationSystemProfileSettingChanged = 0x0000000E, - kXNotificationSystemThemeChanged = 0x8000000F, - kXNotificationSystemSystemUpdateChanged = 0x80000010, kXNotificationSystemMuteListChanged = 0x00000011, kXNotificationSystemInputDevicesChanged = 0x00000012, kXNotificationSystemXLiveTitleUpdate = 0x00000015, @@ -212,7 +207,7 @@ enum : XNotificationID { XNotifyBroadcast(kXNotificationSystemTrayStateChanged, media_type?) - after XamLoaderGetMediaInfoEx(media_type?, title_id?, unk) is used for some funcs the third param is used with - XNotifyBroadcast(kXNotificationUnkUnknown2, unk) + XNotifyBroadcast(kXNotificationSystemUnknown, unk) */ kXNotificationSystemUnknown = 0x80010014, kXNotificationSystemPlayerTimerNotice = 0x00030015, @@ -225,6 +220,11 @@ enum : XNotificationID { kXNotificationSystemAudioLatencyChanged = 0x0008001E, kXNotificationSystemNUIChatBindingChanged = 0x0008001F, kXNotificationSystemInputActivityChanged = 0x00090020, + kXNotificationSystemDashContextChanged = 0x8000000C, + kXNotificationSystemTrayStateChanged = 0x8000000D, + kXNotificationSystemProfileSettingChanged = 0x0000000E, + kXNotificationSystemThemeChanged = 0x8000000F, + kXNotificationSystemSystemUpdateChanged = 0x80000010, // XNotification Live kXNotificationLiveConnectionChanged = 0x02000001,