[XAM/XNOTIFY] - Fixes and more flags

- Properly set is_system in XamNotifyCreateListener
- Save is_system for later use
- Correct X_NOTIFICATION_ID
- Add missing XNotificationID flags
This commit is contained in:
The-Little-Wolf
2026-01-31 10:56:34 -08:00
committed by Radosław Gliński
parent 73e3caa5e1
commit a6e92f43ea
4 changed files with 42 additions and 22 deletions

View File

@@ -162,10 +162,10 @@ constexpr uint8_t XUserIndexAny = 0xFF;
typedef uint32_t XNotificationID;
struct X_NOTIFICATION_ID {
uint32_t reserved : 1; // Always one
uint32_t area : 6;
uint32_t version : 9;
uint32_t message_id : 16;
uint32_t message_id : 16; // 0b0 sz:16
uint32_t version : 9; // 0b16 sz:9
uint32_t area : 6; // 0b25 sz:6
uint32_t Internal : 1; // 0b31 sz:1
};
static_assert_size(X_NOTIFICATION_ID, 4);
@@ -180,6 +180,11 @@ enum : XNotificationID {
kXNotifyParty = 0x00000080,
kXNotifyAll = 0x000000EF,
// Special Flags
kXNotificationInternal = 0x80000000,
kXNotificationAreaMask = 0x7e000000,
kXNotificationVersionMask = 0x01FF0000,
// XNotification System
/* System Notes:
- for some functions if XamIsNuiUIActive returns false then
@@ -187,14 +192,6 @@ enum : XNotificationID {
- XNotifyBroadcast(kXNotificationSystemNUIHardwareStatusChanged,
device_state)
*/
kXNotificationSystemTitleLoad = 0x80000001,
kXNotificationSystemTimeZone = 0x80000002,
kXNotificationSystemLanguage = 0x80000003,
kXNotificationSystemVideoFlags = 0x80000004,
kXNotificationSystemAudioFlags = 0x80000005,
kXNotificationSystemParentalControlGames = 0x80000006,
kXNotificationSystemParentalControlPassword = 0x80000007,
kXNotificationSystemParentalControlMovies = 0x80000008,
kXNotificationSystemUI = 0x00000009,
kXNotificationSystemSignInChanged = 0x0000000A,
kXNotificationSystemStorageDevicesChanged = 0x0000000B,
@@ -211,7 +208,6 @@ enum : XNotificationID {
some funcs the third param is used with
XNotifyBroadcast(kXNotificationSystemUnknown, unk)
*/
kXNotificationSystemUnknown = 0x80010014,
kXNotificationSystemPlayerTimerNotice = 0x00030015,
kXNotificationSystemAvatarChanged = 0x00040017,
kXNotificationSystemNUIHardwareStatusChanged = 0x00060019,
@@ -222,23 +218,35 @@ enum : XNotificationID {
kXNotificationSystemAudioLatencyChanged = 0x0008001E,
kXNotificationSystemNUIChatBindingChanged = 0x0008001F,
kXNotificationSystemInputActivityChanged = 0x00090020,
kXNotificationSystemProfileSettingChanged = 0x0000000E,
// XNotification System Internal
kXNotificationSystemTitleLoad = 0x80000001,
kXNotificationSystemTimeZone = 0x80000002,
kXNotificationSystemLanguage = 0x80000003,
kXNotificationSystemVideoFlags = 0x80000004,
kXNotificationSystemAudioFlags = 0x80000005,
kXNotificationSystemParentalControlGames = 0x80000006,
kXNotificationSystemParentalControlPassword = 0x80000007,
kXNotificationSystemParentalControlMovies = 0x80000008,
kXNotificationSystemDashContextChanged = 0x8000000C,
kXNotificationSystemTrayStateChanged = 0x8000000D,
kXNotificationSystemProfileSettingChanged = 0x0000000E,
kXNotificationSystemThemeChanged = 0x8000000F,
kXNotificationSystemSystemUpdateChanged = 0x80000010,
kXNotificationSystemUnknown = 0x80010014,
kXNotificationSystemDashboard = 0x80040016,
// XNotification Live
kXNotificationLiveConnectionChanged = 0x02000001,
kXNotificationLiveInviteAccepted = 0x02000002,
kXNotificationLiveLinkStateChanged = 0x02000003,
kXNotificationLiveInvitedRecieved = 0x82000004,
kXNotificationLiveInvitedAnswerRecieved = 0x82000005,
kXNotificationLiveMessageListChanged = 0x82000006,
kXNotificationLiveContentInstalled = 0x02000007,
kXNotificationLiveMembershipPurchased = 0x02000008,
kXNotificationLiveVoicechatAway = 0x02000009,
kXNotificationLivePresenceChanged = 0x0200000A,
// XNotification Live Internal
kXNotificationLiveInvitedRecieved = 0x82000004,
kXNotificationLiveInvitedAnswerRecieved = 0x82000005,
kXNotificationLiveMessageListChanged = 0x82000006,
kXNotificationLivePointsBalanceChanged = 0x8200000B,
kXNotificationLivePlayerListChanged = 0x8200000C,
kXNotificationLiveItemPurchased = 0x8200000D,
@@ -247,6 +255,7 @@ enum : XNotificationID {
kXNotificationFriendsPresenceChanged = 0x04000001,
kXNotificationFriendsFriendAdded = 0x04000002,
kXNotificationFriendsFriendRemoved = 0x04000003,
// XNotification Friends Internal
kXNotificationFriendsFriendRequestReceived = 0x84000004,
kXNotificationFriendsFriendAnswerReceived = 0x84000005,
kXNotificationFriendsFriendRequestResult = 0x84000006,
@@ -259,6 +268,7 @@ enum : XNotificationID {
kXNotificationXmpStateChanged = 0x0A000001,
kXNotificationXmpPlaybackBehaviorChanged = 0x0A000002,
kXNotificationXmpPlaybackControllerChanged = 0x0A000003,
// XNotification XMP Internal
kXNotificationXmpMediaSourceConnectionChanged = 0x8A000004,
kXNotificationXmpTitlePlayListContentChanged = 0x8A000005,
kXNotificationXmpLocalMediaContentChanged = 0x8A000006,