[XboxKrnl/xconfig.cc] - Fixes and logging changes
- Adding more information in logs for easier debugging - XamSetDashContext correction - XCONFIG_USER_VIDEO_FLAGS reports widescreen when set in config by user - XCONFIG_SECURED_AV_REGION reports proper values when set in config by user - Added missing \n
This commit is contained in:
parent
bb20ada9bf
commit
b5d319834e
|
@ -35,7 +35,7 @@ DEFINE_uint32(internal_display_resolution, 8,
|
|||
"Allow games that support different resolutions to render "
|
||||
"in a specific resolution.\n"
|
||||
"This is not guaranteed to work with all games or improve "
|
||||
"performance."
|
||||
"performance.\n"
|
||||
" 0=640x480\n"
|
||||
" 1=640x576\n"
|
||||
" 2=720x480\n"
|
||||
|
|
|
@ -170,7 +170,8 @@ void UserProfile::LoadSetting(UserSetting* setting) {
|
|||
} else {
|
||||
// Unsupported for now. Other settings aren't per-game and need to be
|
||||
// stored some other way.
|
||||
XELOGW("Attempting to load unsupported profile setting from disk");
|
||||
XELOGW("Attempting to load unsupported profile setting 0x{:08X} from disk",
|
||||
setting->GetSettingId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -204,7 +205,8 @@ void UserProfile::SaveSetting(UserSetting* setting) {
|
|||
} else {
|
||||
// Unsupported for now. Other settings aren't per-game and need to be
|
||||
// stored some other way.
|
||||
XELOGW("Attempting to save unsupported profile setting to disk");
|
||||
XELOGW("Attempting to save unsupported profile setting 0x{:08X} from disk",
|
||||
setting->GetSettingId());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1255,6 +1255,8 @@ DECLARE_XAM_EXPORT1(XamShowCommunitySessionsUI, kNone, kStub);
|
|||
dword_result_t XamSetDashContext_entry(dword_t value,
|
||||
const ppc_context_t& ctx) {
|
||||
ctx->kernel_state->dash_context_ = value;
|
||||
kernel_state()->BroadcastNotification(
|
||||
kXNotificationDvdDriveUnknownDashContext, 0);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,6 +37,10 @@ DEFINE_int32(user_country, 103,
|
|||
" 102=UA 103=US 104=UY 105=UZ 106=VE 107=VN 108=YE 109=ZA\n",
|
||||
"XConfig");
|
||||
|
||||
DECLARE_bool(widescreen);
|
||||
DECLARE_bool(use_50Hz_mode);
|
||||
DECLARE_int32(video_standard);
|
||||
|
||||
namespace xe {
|
||||
namespace kernel {
|
||||
namespace xboxkrnl {
|
||||
|
@ -56,9 +60,26 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
switch (setting) {
|
||||
case 0x0002: // XCONFIG_SECURED_AV_REGION
|
||||
setting_size = 4;
|
||||
xe::store_and_swap<uint32_t>(value, 0x00001000); // USA/Canada
|
||||
switch (cvars::video_standard) {
|
||||
case 1: // NTSCM
|
||||
xe::store_and_swap<uint32_t>(value, 0x00400100);
|
||||
break;
|
||||
case 2: // NTSCJ
|
||||
xe::store_and_swap<uint32_t>(value, 0x00400200);
|
||||
break;
|
||||
case 3: // PAL
|
||||
xe::store_and_swap<uint32_t>(
|
||||
value, cvars::use_50Hz_mode ? 0x00800300 : 0x00400400);
|
||||
break;
|
||||
default:
|
||||
xe::store_and_swap<uint32_t>(value, 0);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
XELOGW(
|
||||
"An unimplemented setting 0x{:04X} in XCONFIG SECURED CATEGORY",
|
||||
static_cast<uint16_t>(setting));
|
||||
assert_unhandled_case(setting);
|
||||
return X_STATUS_INVALID_PARAMETER_2;
|
||||
}
|
||||
|
@ -83,7 +104,10 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
break;
|
||||
case 0x000A: // XCONFIG_USER_VIDEO_FLAGS
|
||||
setting_size = 4;
|
||||
xe::store_and_swap<uint32_t>(value, 0x00040000);
|
||||
// 0x00040000 normal
|
||||
// 0x00050000 widescreen
|
||||
xe::store_and_swap<uint32_t>(
|
||||
value, cvars::widescreen ? 0x00050000 : 0x00040000);
|
||||
break;
|
||||
case 0x000C: // XCONFIG_USER_RETAIL_FLAGS
|
||||
setting_size = 4;
|
||||
|
@ -95,11 +119,15 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
value[0] = static_cast<uint8_t>(cvars::user_country);
|
||||
break;
|
||||
default:
|
||||
XELOGW("An unimplemented setting 0x{:04X} in XCONFIG USER CATEGORY",
|
||||
static_cast<uint16_t>(setting));
|
||||
assert_unhandled_case(setting);
|
||||
return X_STATUS_INVALID_PARAMETER_2;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
XELOGW("An unimplemented category 0x{:04X}",
|
||||
static_cast<uint16_t>(category));
|
||||
assert_unhandled_case(category);
|
||||
return X_STATUS_INVALID_PARAMETER_1;
|
||||
}
|
||||
|
|
|
@ -272,13 +272,6 @@ constexpr uint8_t XUserIndexAny = 0xFF;
|
|||
// https://github.com/ThirteenAG/Ultimate-ASI-Loader/blob/master/source/xlive/xliveless.h
|
||||
typedef uint32_t XNotificationID;
|
||||
enum : XNotificationID {
|
||||
/* Notes:
|
||||
- kXNotificationSystemUnknown, kXNotificationLiveUnknown,
|
||||
kXNotificationCustomGamercard, kXNotificationDvdDriveUnknown,
|
||||
kXNotificationXmpUnknown, kXNotificationFriendsUnknown, and
|
||||
kXNotificationMsgrUnknown are all called together by XNotifyBroadcast
|
||||
*/
|
||||
|
||||
// Notification Areas
|
||||
kXNotifySystem = 0x00000001,
|
||||
kXNotifyLive = 0x00000002,
|
||||
|
@ -333,6 +326,7 @@ enum : XNotificationID {
|
|||
|
||||
// XNotification Dvd ?
|
||||
kXNotificationDvdDriveUnknown = 0x80000003,
|
||||
kXNotificationDvdDriveUnknownDashContext = 0x8000000C,
|
||||
kXNotificationDvdDriveTrayStateChanged = 0x8000000D,
|
||||
|
||||
// XNotification XMP (13 total)
|
||||
|
|
Loading…
Reference in New Issue