[XAM] Added profile and create content enumerator wrappers

This commit is contained in:
Adrian
2026-02-25 21:46:01 +00:00
committed by Radosław Gliński
parent 54be3c57a0
commit a7f1a3f18a
4 changed files with 98 additions and 12 deletions

View File

@@ -165,7 +165,8 @@ dword_result_t XamProfileCreateEnumerator_entry(dword_t device_id,
return X_ERROR_INVALID_PARAMETER;
}
auto e = new XStaticEnumerator<X_PROFILEENUMRESULT>(kernel_state(), 1);
auto e =
object_ref<ProfileEnumerator>(new ProfileEnumerator(kernel_state(), 1));
auto result =
e->Initialize(XUserIndexAny, 0xFE, 0x23001, 0x23003, 0, 0x28, nullptr);
@@ -178,11 +179,7 @@ dword_result_t XamProfileCreateEnumerator_entry(dword_t device_id,
kernel_state()->xam_state()->profile_manager()->GetAccounts();
for (const auto& [xuid, account] : *accounts) {
X_PROFILEENUMRESULT* profile = e->AppendItem();
profile->xuid_offline = xuid;
profile->device_id = 1;
memcpy(&profile->account, &account, sizeof(X_XAMACCOUNTINFO));
e->AppendItem({xuid, account, 1});
}
*handle_ptr = e->handle();