From 4d7b30e8448b9fec439163d3c6f10b2ca84028a3 Mon Sep 17 00:00:00 2001 From: The-Little-Wolf <116989599+The-Little-Wolf@users.noreply.github.com> Date: Thu, 16 Jan 2025 14:05:47 -0800 Subject: [PATCH] [Xam/XamUser] - Stub XamUserGetOnlineLanguageFromXUID - Stubs XamUserGetOnlineLanguageFromXUID and have it return cvars::user_language - Leave notes for future implementation once we have proper profile support --- src/xenia/kernel/xam/xam_user.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/xenia/kernel/xam/xam_user.cc b/src/xenia/kernel/xam/xam_user.cc index 7802dffa6..3b311bc38 100644 --- a/src/xenia/kernel/xam/xam_user.cc +++ b/src/xenia/kernel/xam/xam_user.cc @@ -799,6 +799,18 @@ dword_result_t XamUserGetUserFlagsFromXUID_entry(qword_t xuid) { } DECLARE_XAM_EXPORT1(XamUserGetUserFlagsFromXUID, kUserProfiles, kImplemented); +dword_result_t XamUserGetOnlineLanguageFromXUID_entry(qword_t xuid) { + /* Notes: + - Calls XamUserGetUserFlagsFromXUID and returns (ulonglong)(cached_flag << + 0x20) >> 0x39 & 0x1f; + - XamUserGetMembershipTierFromXUID and XamUserGetOnlineCountryFromXUID also + call it + - Removed in metro + */ + return cvars::user_language; +} +DECLARE_XAM_EXPORT1(XamUserGetOnlineLanguageFromXUID, kUserProfiles, kStub); + constexpr uint8_t kStatsMaxAmount = 64; struct X_STATS_DETAILS {