[XAM/USER] - Add missing broadcast to XamUserWriteProfileSettings
- Add missing broadcast to XamUserWriteProfileSettings
This commit is contained in:
committed by
Radosław Gliński
parent
a8fe4666ad
commit
78d700af41
@@ -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<uint32_t>(
|
||||
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;
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user