[XAM] Fixed lack of UI notification for headless notifications.

- Fixes regression introduced in previous commit
- Fixed issue with multiple input if certain UI is active
This commit is contained in:
Gliniak
2025-10-11 19:18:19 +02:00
parent 9054a29483
commit 6d28a56911
2 changed files with 18 additions and 4 deletions

View File

@@ -181,6 +181,10 @@ dword_result_t XamInputGetKeystrokeEx_entry(
keystroke.Zero();
if (kernel_state()->xam_state()->xam_dialogs_shown_ > 0) {
return X_ERROR_SUCCESS;
}
uint32_t user_index = *user_index_ptr;
auto input_system = kernel_state()->emulator()->input_system();
auto lock = input_system->lock();

View File

@@ -140,8 +140,13 @@ X_RESULT xeXamDispatchDialogEx(
X_RESULT xeXamDispatchHeadless(std::function<X_RESULT()> run_callback,
uint32_t overlapped) {
auto pre = []() {};
auto post = []() { xe::threading::Sleep(std::chrono::milliseconds(100)); };
auto pre = []() {
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
};
auto post = []() {
xe::threading::Sleep(std::chrono::milliseconds(100));
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
};
if (!overlapped) {
pre();
auto result = run_callback();
@@ -157,8 +162,13 @@ X_RESULT xeXamDispatchHeadless(std::function<X_RESULT()> run_callback,
X_RESULT xeXamDispatchHeadlessEx(
std::function<X_RESULT(uint32_t&, uint32_t&)> run_callback,
uint32_t overlapped) {
auto pre = []() {};
auto post = []() { xe::threading::Sleep(std::chrono::milliseconds(100)); };
auto pre = []() {
kernel_state()->BroadcastNotification(kXNotificationSystemUI, true);
};
auto post = []() {
xe::threading::Sleep(std::chrono::milliseconds(100));
kernel_state()->BroadcastNotification(kXNotificationSystemUI, false);
};
if (!overlapped) {
pre();
uint32_t extended_error, length;