From 1a98a6eaf319c89b5554762ecba13025f8868b53 Mon Sep 17 00:00:00 2001 From: The-Little-Wolf <116989599+The-Little-Wolf@users.noreply.github.com> Date: Tue, 26 Nov 2024 13:57:52 -0800 Subject: [PATCH] [Xam/User] - Stub XamUserCreateTitlesPlayedEnumerator Stub of XamUserCreateTitlesPlayedEnumerator in preparation for future GPD support --- src/xenia/kernel/xam/xam_user.cc | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index d1e2dcecf..d52ce361c 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -625,6 +625,27 @@ dword_result_t XamUserCreateAchievementEnumerator_entry( DECLARE_XAM_EXPORT1(XamUserCreateAchievementEnumerator, kUserProfiles, kSketchy); +dword_result_t XamUserCreateTitlesPlayedEnumerator_entry( + dword_t title_id, dword_t user_index, qword_t xuid, dword_t starting_index, + dword_t game_count, lpdword_t buffer_size_ptr, lpdword_t handle_ptr) { + if (user_index >= XUserMaxUserCount && game_count != 0 && !buffer_size_ptr && + !handle_ptr) { + return X_ERROR_INVALID_PARAMETER; + } + if (!kernel_state()->xam_state()->IsUserSignedIn(user_index)) { + return X_ERROR_INVALID_PARAMETER; + } + + // auto e = new XStaticEnumerator(kernel_state(), + // game_count); auto result = e->Initialize(user_index, 0xFB, 0xB0050, + // 0xB000B, 0x20, game_count, 0); + + XELOGD("XamUserCreateTitlesPlayedEnumerator: Stubbed"); + + return X_ERROR_FUNCTION_FAILED; +} +DECLARE_XAM_EXPORT1(XamUserCreateTitlesPlayedEnumerator, kUserProfiles, kStub); + dword_result_t XamParseGamerTileKey_entry(lpdword_t key_ptr, lpdword_t out1_ptr, lpdword_t out2_ptr, lpdword_t out3_ptr) {