[XAM/INFO] - Implement XamSetActiveDashAppInfo and XamGetActiveDashAppInfo

- Implement XamGetActiveDashAppInfo and XamSetActiveDashAppInfo
This commit is contained in:
The-Little-Wolf 2025-04-27 20:01:34 -07:00 committed by Radosław Gliński
parent 3ba31d9f9a
commit 8cf15a8d54
3 changed files with 28 additions and 0 deletions

View file

@ -388,6 +388,7 @@ class KernelState {
public:
uint32_t dash_context_ = 0;
X_DASH_APP_INFO dash_app_info_ = {};
std::unordered_map<XObject::Type, uint32_t>
host_object_type_enum_to_guest_object_type_ptr_;
uint32_t GetKernelGuestGlobals() const { return kernel_guest_globals_; }

View file

@ -728,6 +728,25 @@ dword_result_t XamIsXbox1TitleId_entry(dword_t title_id) {
}
DECLARE_XAM_EXPORT1(XamIsXbox1TitleId, kNone, kImplemented);
void XamSetActiveDashAppInfo_entry(pointer_t<X_DASH_APP_INFO> dash_app) {
if (!dash_app) {
kernel_state()->dash_app_info_ = {};
return;
}
std::memcpy(&kernel_state()->dash_app_info_, dash_app,
sizeof(X_DASH_APP_INFO));
}
DECLARE_XAM_EXPORT1(XamSetActiveDashAppInfo, kNone, kImplemented);
void XamGetActiveDashAppInfo_entry(pointer_t<X_DASH_APP_INFO> dash_app) {
if (!dash_app) {
return;
}
std::memcpy(dash_app, &kernel_state()->dash_app_info_,
sizeof(X_DASH_APP_INFO));
}
DECLARE_XAM_EXPORT1(XamGetActiveDashAppInfo, kNone, kImplemented);
} // namespace xam
} // namespace kernel
} // namespace xe

View file

@ -779,6 +779,14 @@ struct MESSAGEBOX_RESULT {
#define DPAD_LEFT_PASSCODE 0x00005812
#define DPAD_RIGHT_PASSCODE 0x00005813
#pragma pack(push, 4)
struct X_DASH_APP_INFO {
uint64_t unk1;
uint32_t unk2;
};
static_assert_size(X_DASH_APP_INFO, 0xC);
#pragma pack(pop)
// clang-format on
} // namespace xe