Compare commits

..

3 Commits

Author SHA1 Message Date
The-Little-Wolf 57f4282be8
Merge 4d1c0f97a3 into 4d7b30e844 2025-01-17 00:34:56 -08:00
The-Little-Wolf 4d7b30e844 [Xam/XamUser] - Stub XamUserGetOnlineLanguageFromXUID
- Stubs XamUserGetOnlineLanguageFromXUID and have it return cvars::user_language
- Leave notes for future implementation once we have proper profile support
2025-01-17 08:32:46 +01:00
Adrian ae23222ba8 [Emulator] Validate module is an executable before launching 2025-01-17 08:04:49 +01:00
2 changed files with 18 additions and 0 deletions

View File

@ -1372,6 +1372,12 @@ X_STATUS Emulator::CompleteLaunch(const std::filesystem::path& path,
return X_STATUS_NOT_FOUND;
}
if (!module->is_executable()) {
kernel_state_->UnloadUserModule(module, false);
XELOGE("Failed to load user module {}", path);
return X_STATUS_NOT_SUPPORTED;
}
X_RESULT result = kernel_state_->ApplyTitleUpdate(module);
if (XFAILED(result)) {
XELOGE("Failed to apply title update! Cannot run module {}", path);

View File

@ -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 {