[Kernel] Fixed incorrect behaviour of IsSystemTitle util

- Added missing symlinks
This commit is contained in:
Gliniak 2025-05-17 22:28:22 +02:00
parent 5e9019309e
commit d211130c6c
3 changed files with 11 additions and 3 deletions

View File

@ -579,6 +579,14 @@ X_STATUS Emulator::LaunchXexFile(const std::filesystem::path& path) {
if (!kernel::IsSystemTitle(title_id)) {
// Assumption that any loaded game is loaded as a disc.
kernel_state_->deployment_type_ = XDeploymentType::kOpticalDisc;
} else {
const std::string mount_path = xe::path_to_utf8(
std::filesystem::path(kernel_state_->GetExecutableModule()->path())
.parent_path());
// System related symlinks
file_system_->RegisterSymbolicLink("media:", mount_path);
file_system_->RegisterSymbolicLink("font:", mount_path);
}
}
return result;

View File

@ -73,11 +73,11 @@ static constexpr bool IsSystemTitle(const uint32_t title_id) {
}
if (!IsXboxTitle(title_id)) {
return IsValidGameId(title_id);
return !IsValidGameId(title_id);
}
if (IsXblaTitle(title_id)) {
return IsValidGameId(title_id);
return !IsValidGameId(title_id);
}
return true;

View File

@ -135,7 +135,7 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
case 0x000C: // XCONFIG_USER_RETAIL_FLAGS
setting_size = 4;
// TODO(benvanik): get this value.
xe::store_and_swap<uint32_t>(value, 0);
xe::store_and_swap<uint32_t>(value, 0x40);
break;
case 0x000E: // XCONFIG_USER_COUNTRY
setting_size = 1;