[Xbox] kXNotification Additions
- Discovered new unknown kXNotificationID use by XNotifyBroadcast together and wanted to record them before I forget them. - Changed kXNotificationID to kXNotification - Added kXNotificationSystemPXLiveSystemUpdate
This commit is contained in:
parent
b757601f01
commit
95df198d8a
|
@ -1405,15 +1405,13 @@ void EmulatorWindow::ToggleDisplayConfigDialog() {
|
|||
void EmulatorWindow::ToggleProfilesConfigDialog() {
|
||||
if (!profile_config_dialog_) {
|
||||
disable_hotkeys_ = true;
|
||||
emulator_->kernel_state()->BroadcastNotification(kXNotificationIDSystemUI,
|
||||
1);
|
||||
emulator_->kernel_state()->BroadcastNotification(kXNotificationSystemUI, 1);
|
||||
profile_config_dialog_ =
|
||||
std::make_unique<ProfileConfigDialog>(imgui_drawer_.get(), this);
|
||||
kernel::xam::xam_dialogs_shown_++;
|
||||
} else {
|
||||
disable_hotkeys_ = false;
|
||||
emulator_->kernel_state()->BroadcastNotification(kXNotificationIDSystemUI,
|
||||
0);
|
||||
emulator_->kernel_state()->BroadcastNotification(kXNotificationSystemUI, 0);
|
||||
profile_config_dialog_.reset();
|
||||
kernel::xam::xam_dialogs_shown_--;
|
||||
}
|
||||
|
|
|
@ -483,7 +483,7 @@ void AudioMediaPlayer::SetCaptureCallback(uint32_t callback, uint32_t context,
|
|||
}
|
||||
|
||||
void AudioMediaPlayer::OnStateChanged() {
|
||||
kernel_state_->BroadcastNotification(kNotificationXmpStateChanged,
|
||||
kernel_state_->BroadcastNotification(kXNotificationXmpStateChanged,
|
||||
static_cast<uint32_t>(state_));
|
||||
}
|
||||
|
||||
|
|
|
@ -835,8 +835,7 @@ X_STATUS Emulator::InstallContentPackage(
|
|||
return error_code;
|
||||
}
|
||||
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDLiveContentInstalled,
|
||||
0);
|
||||
kernel_state()->BroadcastNotification(kXNotificationLiveContentInstalled, 0);
|
||||
|
||||
return error_code;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ void InputSystem::UpdateUsedSlot(InputDriver* driver, uint8_t slot,
|
|||
connected_slots.flip(slot);
|
||||
if (kernel::kernel_state()) {
|
||||
kernel::kernel_state()->BroadcastNotification(
|
||||
kXNotificationIDSystemInputDevicesChanged, 0);
|
||||
kXNotificationSystemInputDevicesChanged, 0);
|
||||
}
|
||||
|
||||
if (driver) {
|
||||
|
|
|
@ -867,11 +867,11 @@ void KernelState::RegisterNotifyListener(XNotifyListener* listener) {
|
|||
if (!has_notified_startup_ && listener->mask() & kXNotifySystem) {
|
||||
has_notified_startup_ = true;
|
||||
// XN_SYS_UI (on, off)
|
||||
listener->EnqueueNotification(kXNotificationIDSystemUI, 1);
|
||||
listener->EnqueueNotification(kXNotificationIDSystemUI, 0);
|
||||
listener->EnqueueNotification(kXNotificationSystemUI, 1);
|
||||
listener->EnqueueNotification(kXNotificationSystemUI, 0);
|
||||
// XN_SYS_SIGNINCHANGED x2
|
||||
listener->EnqueueNotification(kXNotificationIDSystemSignInChanged, 1);
|
||||
listener->EnqueueNotification(kXNotificationIDSystemSignInChanged, 1);
|
||||
listener->EnqueueNotification(kXNotificationSystemSignInChanged, 1);
|
||||
listener->EnqueueNotification(kXNotificationSystemSignInChanged, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ X_HRESULT XmpApp::XMPPlayTitlePlaylist(uint32_t playlist_handle,
|
|||
XELOGD("XMPPlayTitlePlaylist({:08X}, {:08X})", playlist_handle, song_handle);
|
||||
kernel_state_->emulator()->audio_media_player()->Play(playlist_handle,
|
||||
song_handle, false);
|
||||
kernel_state_->BroadcastNotification(kNotificationXmpPlaybackBehaviorChanged,
|
||||
kernel_state_->BroadcastNotification(kXNotificationXmpPlaybackBehaviorChanged,
|
||||
1);
|
||||
return X_E_SUCCESS;
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
|
|||
static_cast<PlaybackFlags>(uint32_t(args->flags)));
|
||||
|
||||
kernel_state_->BroadcastNotification(
|
||||
kNotificationXmpPlaybackBehaviorChanged, 0);
|
||||
kXNotificationXmpPlaybackBehaviorChanged, 0);
|
||||
return X_E_SUCCESS;
|
||||
}
|
||||
case 0x00070009: {
|
||||
|
@ -359,7 +359,7 @@ X_HRESULT XmpApp::DispatchMessageSync(uint32_t message, uint32_t buffer_ptr,
|
|||
PlaybackClient(uint32_t(args->playback_client)));
|
||||
|
||||
kernel_state_->BroadcastNotification(
|
||||
kNotificationXmpPlaybackControllerChanged,
|
||||
kXNotificationXmpPlaybackControllerChanged,
|
||||
kernel_state_->emulator()
|
||||
->audio_media_player()
|
||||
->IsTitleInPlaybackControl());
|
||||
|
|
|
@ -324,7 +324,7 @@ void ProfileManager::Login(const uint64_t xuid, const uint8_t user_index,
|
|||
}
|
||||
|
||||
if (notify) {
|
||||
kernel_state_->BroadcastNotification(kXNotificationIDSystemSignInChanged,
|
||||
kernel_state_->BroadcastNotification(kXNotificationSystemSignInChanged,
|
||||
GetUsedUserSlots().to_ulong());
|
||||
}
|
||||
UpdateConfig(xuid, assigned_user_slot);
|
||||
|
@ -338,7 +338,7 @@ void ProfileManager::Logout(const uint8_t user_index, bool notify) {
|
|||
DismountProfile(profile->second->xuid());
|
||||
logged_profiles_.erase(profile);
|
||||
if (notify) {
|
||||
kernel_state_->BroadcastNotification(kXNotificationIDSystemSignInChanged,
|
||||
kernel_state_->BroadcastNotification(kXNotificationSystemSignInChanged,
|
||||
GetUsedUserSlots().to_ulong());
|
||||
}
|
||||
UpdateConfig(0, user_index);
|
||||
|
@ -352,7 +352,7 @@ void ProfileManager::LoginMultiple(
|
|||
slots_mask |= (1 << slot);
|
||||
}
|
||||
|
||||
kernel_state_->BroadcastNotification(kXNotificationIDSystemSignInChanged,
|
||||
kernel_state_->BroadcastNotification(kXNotificationSystemSignInChanged,
|
||||
slots_mask);
|
||||
}
|
||||
|
||||
|
|
|
@ -85,7 +85,7 @@ X_RESULT xeXamDispatchDialog(T* dialog,
|
|||
std::function<X_RESULT(T*)> close_callback,
|
||||
uint32_t overlapped) {
|
||||
auto pre = []() {
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, true);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
|
||||
};
|
||||
auto run = [dialog, close_callback]() -> X_RESULT {
|
||||
X_RESULT result;
|
||||
|
@ -108,7 +108,7 @@ X_RESULT xeXamDispatchDialog(T* dialog,
|
|||
};
|
||||
auto post = []() {
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, false);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
|
||||
};
|
||||
if (!overlapped) {
|
||||
pre();
|
||||
|
@ -126,7 +126,7 @@ X_RESULT xeXamDispatchDialogEx(
|
|||
T* dialog, std::function<X_RESULT(T*, uint32_t&, uint32_t&)> close_callback,
|
||||
uint32_t overlapped) {
|
||||
auto pre = []() {
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, true);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
|
||||
};
|
||||
auto run = [dialog, close_callback](uint32_t& extended_error,
|
||||
uint32_t& length) -> X_RESULT {
|
||||
|
@ -150,7 +150,7 @@ X_RESULT xeXamDispatchDialogEx(
|
|||
};
|
||||
auto post = []() {
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, false);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
|
||||
};
|
||||
if (!overlapped) {
|
||||
pre();
|
||||
|
@ -168,11 +168,11 @@ X_RESULT xeXamDispatchDialogEx(
|
|||
X_RESULT xeXamDispatchHeadless(std::function<X_RESULT()> run_callback,
|
||||
uint32_t overlapped) {
|
||||
auto pre = []() {
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, true);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
|
||||
};
|
||||
auto post = []() {
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, false);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
|
||||
};
|
||||
if (!overlapped) {
|
||||
pre();
|
||||
|
@ -190,11 +190,11 @@ X_RESULT xeXamDispatchHeadlessEx(
|
|||
std::function<X_RESULT(uint32_t&, uint32_t&)> run_callback,
|
||||
uint32_t overlapped) {
|
||||
auto pre = []() {
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, true);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
|
||||
};
|
||||
auto post = []() {
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, false);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
|
||||
};
|
||||
if (!overlapped) {
|
||||
pre();
|
||||
|
@ -213,7 +213,7 @@ X_RESULT xeXamDispatchHeadlessEx(
|
|||
template <typename T>
|
||||
X_RESULT xeXamDispatchDialogAsync(T* dialog,
|
||||
std::function<void(T*)> close_callback) {
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, true);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
|
||||
++xam_dialogs_shown_;
|
||||
|
||||
// Important to pass captured vars by value here since we return from this
|
||||
|
@ -226,7 +226,7 @@ X_RESULT xeXamDispatchDialogAsync(T* dialog,
|
|||
|
||||
auto run = []() -> void {
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, false);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
|
||||
};
|
||||
|
||||
std::thread thread(run);
|
||||
|
@ -237,7 +237,7 @@ X_RESULT xeXamDispatchDialogAsync(T* dialog,
|
|||
}
|
||||
|
||||
X_RESULT xeXamDispatchHeadlessAsync(std::function<void()> run_callback) {
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, true);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
|
||||
++xam_dialogs_shown_;
|
||||
|
||||
auto display_window = kernel_state()->emulator()->display_window();
|
||||
|
@ -248,7 +248,7 @@ X_RESULT xeXamDispatchHeadlessAsync(std::function<void()> run_callback) {
|
|||
|
||||
auto run = []() -> void {
|
||||
xe::threading::Sleep(std::chrono::milliseconds(100));
|
||||
kernel_state()->BroadcastNotification(kXNotificationIDSystemUI, false);
|
||||
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
|
||||
};
|
||||
|
||||
std::thread thread(run);
|
||||
|
@ -1295,7 +1295,7 @@ X_HRESULT xeXShowMarketplaceUIEx(dword_t user_index, dword_t ui_type,
|
|||
cvars::license_mask = 1;
|
||||
|
||||
kernel_state()->BroadcastNotification(
|
||||
kXNotificationIDLiveContentInstalled, 0);
|
||||
kXNotificationLiveContentInstalled, 0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -271,60 +271,81 @@ constexpr uint8_t XUserIndexAny = 0xFF;
|
|||
// https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/source/xlive/xliveless.h
|
||||
typedef uint32_t XNotificationID;
|
||||
enum : XNotificationID {
|
||||
/* Notes:
|
||||
- kXNotificationSystemUnknown, kXNotificationLiveUnknown,
|
||||
kXNotificationCustomGamercard, kXNotificationDvdDriveUnknown,
|
||||
kXNotificationXmpUnknown, kXNotificationFriendsUnknown, and
|
||||
kXNotificationMsgrUnknown are all called together by XNotifyBroadcast
|
||||
*/
|
||||
|
||||
// Notification Areas
|
||||
kXNotifySystem = 0x00000001,
|
||||
kXNotifyLive = 0x00000002,
|
||||
kXNotifyFriends = 0x00000004,
|
||||
kXNotifyCustom = 0x00000008,
|
||||
kXNotifyDvdDrive = 0x00000010, // ?
|
||||
kXNotifyXmp = 0x00000020,
|
||||
kXNotifyMsgr = 0x00000040,
|
||||
kXNotifyParty = 0x00000080,
|
||||
kXNotifyAll = 0x000000EF,
|
||||
|
||||
// XNotification System
|
||||
kXNotificationIDSystemUI = 0x00000009,
|
||||
kXNotificationIDSystemSignInChanged = 0x0000000A,
|
||||
kXNotificationIDSystemStorageDevicesChanged = 0x0000000B,
|
||||
kXNotificationIDSystemProfileSettingChanged = 0x0000000E,
|
||||
kXNotificationIDSystemMuteListChanged = 0x00000011,
|
||||
kXNotificationIDSystemInputDevicesChanged = 0x00000012,
|
||||
kXNotificationIDSystemInputDeviceConfigChanged = 0x00000013,
|
||||
kXNotificationIDSystemPlayerTimerNotice = 0x00000015,
|
||||
kXNotificationIDSystemAvatarChanged = 0x00000017,
|
||||
kXNotificationIDSystemNUIHardwareStatusChanged = 0x00000019,
|
||||
kXNotificationIDSystemNUIPause = 0x0000001A,
|
||||
kXNotificationIDSystemNUIUIApproach = 0x0000001B,
|
||||
kXNotificationIDSystemDeviceRemap = 0x0000001C,
|
||||
kXNotificationIDSystemNUIBindingChanged = 0x0000001D,
|
||||
kXNotificationIDSystemAudioLatencyChanged = 0x0000001E,
|
||||
kXNotificationIDSystemNUIChatBindingChanged = 0x0000001F,
|
||||
kXNotificationIDSystemInputActivityChanged = 0x00000020,
|
||||
// XNotification System (35 total)
|
||||
kXNotificationSystemUI = 0x00000009,
|
||||
kXNotificationSystemSignInChanged = 0x0000000A,
|
||||
kXNotificationSystemStorageDevicesChanged = 0x0000000B,
|
||||
kXNotificationSystemProfileSettingChanged = 0x0000000E,
|
||||
kXNotificationSystemMuteListChanged = 0x00000011,
|
||||
kXNotificationSystemInputDevicesChanged = 0x00000012,
|
||||
kXNotificationSystemInputDeviceConfigChanged = 0x00000013,
|
||||
kXNotificationSystemPlayerTimerNotice = 0x00000015,
|
||||
kXNotificationSystemPXLiveSystemUpdate = 0x00000016,
|
||||
kXNotificationSystemAvatarChanged = 0x00000017,
|
||||
kXNotificationSystemUnknown = 0x00000018,
|
||||
kXNotificationSystemNUIHardwareStatusChanged = 0x00000019,
|
||||
kXNotificationSystemNUIPause = 0x0000001A,
|
||||
kXNotificationSystemNUIUIApproach = 0x0000001B,
|
||||
kXNotificationSystemDeviceRemap = 0x0000001C,
|
||||
kXNotificationSystemNUIBindingChanged = 0x0000001D,
|
||||
kXNotificationSystemAudioLatencyChanged = 0x0000001E,
|
||||
kXNotificationSystemNUIChatBindingChanged = 0x0000001F,
|
||||
kXNotificationSystemInputActivityChanged = 0x00000020,
|
||||
|
||||
// XNotification Live
|
||||
kXNotificationIDLiveConnectionChanged = 0x02000001,
|
||||
kXNotificationIDLiveInviteAccepted = 0x02000002,
|
||||
kXNotificationIDLiveLinkStateChanged = 0x02000003,
|
||||
kXNotificationIDLiveContentInstalled = 0x02000007,
|
||||
kXNotificationIDLiveMembershipPurchased = 0x02000008,
|
||||
kXNotificationIDLiveVoicechatAway = 0x02000009,
|
||||
kXNotificationIDLivePresenceChanged = 0x0200000A,
|
||||
// XNotification Live (20 total)
|
||||
kXNotificationLiveConnectionChanged = 0x02000001,
|
||||
kXNotificationLiveInviteAccepted = 0x02000002,
|
||||
kXNotificationLiveLinkStateChanged = 0x02000003,
|
||||
kXNotificationLiveContentInstalled = 0x02000007,
|
||||
kXNotificationLiveMembershipPurchased = 0x02000008,
|
||||
kXNotificationLiveVoicechatAway = 0x02000009,
|
||||
kXNotificationLivePresenceChanged = 0x0200000A,
|
||||
kXNotificationLiveUnknown = 0x02000012,
|
||||
|
||||
// XNotification Friends
|
||||
kXNotificationIDFriendsPresenceChanged = 0x04000001,
|
||||
kXNotificationIDFriendsFriendAdded = 0x04000002,
|
||||
kXNotificationIDFriendsFriendRemoved = 0x04000003,
|
||||
// XNotification Friends (9 total)
|
||||
kXNotificationFriendsPresenceChanged = 0x04000001,
|
||||
kXNotificationFriendsFriendAdded = 0x04000002,
|
||||
kXNotificationFriendsFriendRemoved = 0x04000003,
|
||||
kXNotificationFriendsUnknown = 0x04000008,
|
||||
|
||||
// XNotification Custom
|
||||
kXNotificationIDCustomActionPressed = 0x06000003,
|
||||
kXNotificationIDCustomGamercard = 0x06000004,
|
||||
// XNotification Custom (5 total)
|
||||
kXNotificationCustomActionPressed = 0x06000003,
|
||||
kXNotificationCustomGamercard = 0x06000004,
|
||||
|
||||
// XNotification XMP
|
||||
kNotificationXmpStateChanged = 0x0A000001,
|
||||
kNotificationXmpPlaybackBehaviorChanged = 0x0A000002,
|
||||
kNotificationXmpPlaybackControllerChanged = 0x0A000003,
|
||||
// XNotification Dvd ?
|
||||
kXNotificationDvdDriveUnknown = 0x80000003,
|
||||
kXNotificationDvdDriveTrayStateChanged = 0x8000000D,
|
||||
|
||||
// XNotification Party
|
||||
kXNotificationIDPartyMembersChanged = 0x0E000002,
|
||||
// XNotification XMP (13 total)
|
||||
kXNotificationXmpStateChanged = 0x0A000001,
|
||||
kXNotificationXmpPlaybackBehaviorChanged = 0x0A000002,
|
||||
kXNotificationXmpPlaybackControllerChanged = 0x0A000003,
|
||||
kXNotificationXmpUnknown = 0x0A00000C,
|
||||
|
||||
// XNotification Party (6 total)
|
||||
kXNotificationPartyMembersChanged = 0x0E000002,
|
||||
kXNotificationFriendUnknown = 0x0E000005,
|
||||
|
||||
// XNotification Msgr
|
||||
kXNotificationMsgrUnknown = 0x0C00000E,
|
||||
};
|
||||
|
||||
// https://github.com/CodeAsm/ffplay360/blob/master/Common/XTLOnPC.h
|
||||
|
|
Loading…
Reference in New Issue