[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) {
|
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.
|
// Update and save settings.
|
||||||
const auto& user_profile =
|
const auto& user_profile =
|
||||||
kernel_state()->xam_state()->GetUserProfile(user_index);
|
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) {
|
for (uint32_t n = 0; n < setting_count; ++n) {
|
||||||
const UserSetting setting = UserSetting(&settings[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()) {
|
if (!setting.is_valid_type()) {
|
||||||
continue;
|
continue;
|
||||||
@@ -378,6 +385,13 @@ dword_result_t XamUserWriteProfileSettings_entry(
|
|||||||
user_profile->xuid(), title_id, &setting);
|
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);
|
extended_error = X_HRESULT_FROM_WIN32(X_STATUS_SUCCESS);
|
||||||
length = 0;
|
length = 0;
|
||||||
return X_STATUS_SUCCESS;
|
return X_STATUS_SUCCESS;
|
||||||
|
|||||||
@@ -196,11 +196,6 @@ enum : XNotificationID {
|
|||||||
kXNotificationSystemUI = 0x00000009,
|
kXNotificationSystemUI = 0x00000009,
|
||||||
kXNotificationSystemSignInChanged = 0x0000000A,
|
kXNotificationSystemSignInChanged = 0x0000000A,
|
||||||
kXNotificationSystemStorageDevicesChanged = 0x0000000B,
|
kXNotificationSystemStorageDevicesChanged = 0x0000000B,
|
||||||
kXNotificationSystemDashContextChanged = 0x8000000C,
|
|
||||||
kXNotificationSystemTrayStateChanged = 0x8000000D,
|
|
||||||
kXNotificationSystemProfileSettingChanged = 0x0000000E,
|
|
||||||
kXNotificationSystemThemeChanged = 0x8000000F,
|
|
||||||
kXNotificationSystemSystemUpdateChanged = 0x80000010,
|
|
||||||
kXNotificationSystemMuteListChanged = 0x00000011,
|
kXNotificationSystemMuteListChanged = 0x00000011,
|
||||||
kXNotificationSystemInputDevicesChanged = 0x00000012,
|
kXNotificationSystemInputDevicesChanged = 0x00000012,
|
||||||
kXNotificationSystemXLiveTitleUpdate = 0x00000015,
|
kXNotificationSystemXLiveTitleUpdate = 0x00000015,
|
||||||
@@ -212,7 +207,7 @@ enum : XNotificationID {
|
|||||||
XNotifyBroadcast(kXNotificationSystemTrayStateChanged, media_type?)
|
XNotifyBroadcast(kXNotificationSystemTrayStateChanged, media_type?)
|
||||||
- after XamLoaderGetMediaInfoEx(media_type?, title_id?, unk) is used for
|
- after XamLoaderGetMediaInfoEx(media_type?, title_id?, unk) is used for
|
||||||
some funcs the third param is used with
|
some funcs the third param is used with
|
||||||
XNotifyBroadcast(kXNotificationUnkUnknown2, unk)
|
XNotifyBroadcast(kXNotificationSystemUnknown, unk)
|
||||||
*/
|
*/
|
||||||
kXNotificationSystemUnknown = 0x80010014,
|
kXNotificationSystemUnknown = 0x80010014,
|
||||||
kXNotificationSystemPlayerTimerNotice = 0x00030015,
|
kXNotificationSystemPlayerTimerNotice = 0x00030015,
|
||||||
@@ -225,6 +220,11 @@ enum : XNotificationID {
|
|||||||
kXNotificationSystemAudioLatencyChanged = 0x0008001E,
|
kXNotificationSystemAudioLatencyChanged = 0x0008001E,
|
||||||
kXNotificationSystemNUIChatBindingChanged = 0x0008001F,
|
kXNotificationSystemNUIChatBindingChanged = 0x0008001F,
|
||||||
kXNotificationSystemInputActivityChanged = 0x00090020,
|
kXNotificationSystemInputActivityChanged = 0x00090020,
|
||||||
|
kXNotificationSystemDashContextChanged = 0x8000000C,
|
||||||
|
kXNotificationSystemTrayStateChanged = 0x8000000D,
|
||||||
|
kXNotificationSystemProfileSettingChanged = 0x0000000E,
|
||||||
|
kXNotificationSystemThemeChanged = 0x8000000F,
|
||||||
|
kXNotificationSystemSystemUpdateChanged = 0x80000010,
|
||||||
|
|
||||||
// XNotification Live
|
// XNotification Live
|
||||||
kXNotificationLiveConnectionChanged = 0x02000001,
|
kXNotificationLiveConnectionChanged = 0x02000001,
|
||||||
|
|||||||
Reference in New Issue
Block a user