diff --git a/src/xenia/kernel/xam/xam_ui.cc b/src/xenia/kernel/xam/xam_ui.cc index bbdbb3046..e555f5323 100644 --- a/src/xenia/kernel/xam/xam_ui.cc +++ b/src/xenia/kernel/xam/xam_ui.cc @@ -71,7 +71,9 @@ template X_RESULT xeXamDispatchDialog(T* dialog, std::function close_callback, uint32_t overlapped) { - auto pre = []() {}; + auto pre = []() { + kernel_state()->BroadcastNotification(kXNotificationSystemUI, true); + }; auto run = [dialog, close_callback]() -> X_RESULT { X_RESULT result; dialog->set_close_callback([&dialog, &result, &close_callback]() { @@ -89,7 +91,10 @@ X_RESULT xeXamDispatchDialog(T* dialog, // dialog should be deleted at this point! return result; }; - auto post = []() { xe::threading::Sleep(std::chrono::milliseconds(100)); }; + auto post = []() { + xe::threading::Sleep(std::chrono::milliseconds(100)); + kernel_state()->BroadcastNotification(kXNotificationSystemUI, false); + }; if (!overlapped) { pre(); auto result = run(); @@ -105,7 +110,9 @@ template X_RESULT xeXamDispatchDialogEx( T* dialog, std::function close_callback, uint32_t overlapped) { - auto pre = []() {}; + auto pre = []() { + kernel_state()->BroadcastNotification(kXNotificationSystemUI, true); + }; auto run = [dialog, close_callback](uint32_t& extended_error, uint32_t& length) -> X_RESULT { auto display_window = kernel_state()->emulator()->display_window(); @@ -124,7 +131,10 @@ X_RESULT xeXamDispatchDialogEx( // dialog should be deleted at this point! return result; }; - auto post = []() { xe::threading::Sleep(std::chrono::milliseconds(100)); }; + auto post = []() { + xe::threading::Sleep(std::chrono::milliseconds(100)); + kernel_state()->BroadcastNotification(kXNotificationSystemUI, false); + }; if (!overlapped) { pre(); uint32_t extended_error, length;