From fbacd3c12d745febcf31c40f587d084f57ca5cd3 Mon Sep 17 00:00:00 2001 From: The-Little-Wolf <116989599+The-Little-Wolf@users.noreply.github.com> Date: Fri, 24 Jan 2025 10:10:03 -0800 Subject: [PATCH] [Xam/Xam_NUI] - Implement XamShowNuiHardwareRequiredUI - Implement XamShowNuiHardwareRequiredUI - Add notes to XamShowNuiTroubleshooterUI --- src/xenia/kernel/xam/xam_nui.cc | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/src/xenia/kernel/xam/xam_nui.cc b/src/xenia/kernel/xam/xam_nui.cc index 53fe06e6f..512eb043b 100644 --- a/src/xenia/kernel/xam/xam_nui.cc +++ b/src/xenia/kernel/xam/xam_nui.cc @@ -41,10 +41,18 @@ void XamNuiGetDeviceStatus_entry(pointer_t status_ptr) { } DECLARE_XAM_EXPORT1(XamNuiGetDeviceStatus, kNone, kStub); +// UI dword_result_t XamShowNuiTroubleshooterUI_entry(unknown_t unk1, unknown_t unk2, - unknown_t unk3) { - // unk1 is 0xFF - possibly user index? - // unk2, unk3 appear to always be zero. + dword_t flag) { + /* Notes: + - unk1 is 0xFF - possibly user index? + - unk2 appear to always be zero. + - First calls XamPackageManagerGetExperienceMode and checks if the return + is less than zero + - If less than zero then returns error message below + - else it checks if flag = 0x800000 if it does then call + XamNuiGetDeviceStatus. if not return error + */ if (cvars::headless) { return 0; @@ -71,6 +79,15 @@ dword_result_t XamShowNuiTroubleshooterUI_entry(unknown_t unk1, unknown_t unk2, } DECLARE_XAM_EXPORT1(XamShowNuiTroubleshooterUI, kNone, kStub); +dword_result_t XamShowNuiHardwareRequiredUI_entry(unknown_t unk1) { + if (unk1 != 0) { + return X_ERROR_INVALID_PARAMETER; + } + + return XamShowNuiTroubleshooterUI_entry(0xff, 0, 0x400000); +} +DECLARE_XAM_EXPORT1(XamShowNuiHardwareRequiredUI, kNone, kImplemented); + } // namespace xam } // namespace kernel } // namespace xe