[HID] Pass 'is active' callback to input drivers.
This commit is contained in:
@@ -19,6 +19,10 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
std::atomic<int> xam_dialogs_shown_ = {0};
|
||||
|
||||
bool xeXamIsUIActive() { return xam_dialogs_shown_ > 0; }
|
||||
|
||||
XamModule::XamModule(Emulator* emulator, KernelState* kernel_state)
|
||||
: KernelModule(kernel_state, "xe:\\xam.xex"), loader_data_() {
|
||||
RegisterExportTable(export_resolver_);
|
||||
|
||||
@@ -21,6 +21,8 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
bool xeXamIsUIActive();
|
||||
|
||||
class XamModule : public KernelModule {
|
||||
public:
|
||||
XamModule(Emulator* emulator, KernelState* kernel_state);
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace xe {
|
||||
namespace kernel {
|
||||
namespace xam {
|
||||
|
||||
bool xeXamIsUIActive();
|
||||
|
||||
xe::cpu::Export* RegisterExport_xam(xe::cpu::Export* export_entry);
|
||||
|
||||
// Registration functions, one per file.
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace xam {
|
||||
// We deliberately delay the XN_SYS_UI = false notification to give games time
|
||||
// to create a listener (if they're insane enough do this).
|
||||
|
||||
std::atomic<int> xam_dialogs_shown_ = {0};
|
||||
extern std::atomic<int> xam_dialogs_shown_;
|
||||
|
||||
class XamDialog : public xe::ui::ImGuiDialog {
|
||||
public:
|
||||
@@ -192,7 +192,7 @@ X_RESULT xeXamDispatchHeadlessEx(
|
||||
}
|
||||
}
|
||||
|
||||
dword_result_t XamIsUIActive() { return xam_dialogs_shown_ > 0 ? 1 : 0; }
|
||||
dword_result_t XamIsUIActive() { return xeXamIsUIActive(); }
|
||||
DECLARE_XAM_EXPORT2(XamIsUIActive, kUI, kImplemented, kHighFrequency);
|
||||
|
||||
class MessageBoxDialog : public XamDialog {
|
||||
|
||||
Reference in New Issue
Block a user