mirror of
https://github.com/xenia-project/xenia.git
synced 2025-12-06 07:12:03 +01:00
[XConfig] Changed raw category values into enum
This commit is contained in:
parent
63c2d94a98
commit
a79c00f67a
|
|
@ -64,7 +64,7 @@ namespace xe {
|
|||
namespace kernel {
|
||||
namespace xboxkrnl {
|
||||
|
||||
X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
||||
X_STATUS xeExGetXConfigSetting(X_CONFIG_CATEGORY category, uint16_t setting,
|
||||
void* buffer, uint16_t buffer_size,
|
||||
uint16_t* required_size) {
|
||||
uint16_t setting_size = 0;
|
||||
|
|
@ -74,8 +74,7 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
// https://free60project.github.io/wiki/XConfig.html
|
||||
// https://github.com/oukiar/freestyledash/blob/master/Freestyle/Tools/Generic/ExConfig.h
|
||||
switch (category) {
|
||||
case 0x0002:
|
||||
// XCONFIG_SECURED_CATEGORY
|
||||
case XCONFIG_SECURED_CATEGORY:
|
||||
switch (setting) {
|
||||
case 0x0002: // XCONFIG_SECURED_AV_REGION
|
||||
setting_size = 4;
|
||||
|
|
@ -104,8 +103,7 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
return X_STATUS_INVALID_PARAMETER_2;
|
||||
}
|
||||
break;
|
||||
case 0x0003:
|
||||
// XCONFIG_USER_CATEGORY
|
||||
case XCONFIG_USER_CATEGORY:
|
||||
switch (setting) {
|
||||
case 0x0001: // XCONFIG_USER_TIME_ZONE_BIAS
|
||||
case 0x0002: // XCONFIG_USER_TIME_ZONE_STD_NAME
|
||||
|
|
@ -184,8 +182,7 @@ X_STATUS xeExGetXConfigSetting(uint16_t category, uint16_t setting,
|
|||
return X_STATUS_INVALID_PARAMETER_2;
|
||||
}
|
||||
break;
|
||||
case 0x0007:
|
||||
// XCONFIG_CONSOLE_SETTINGS
|
||||
case XCONFIG_CONSOLE_CATEGORY:
|
||||
switch (setting) {
|
||||
case 0x0001: // XCONFIG_CONSOLE_SCREENSAVER
|
||||
setting_size = 2;
|
||||
|
|
@ -243,8 +240,9 @@ dword_result_t ExGetXConfigSetting_entry(word_t category, word_t setting,
|
|||
word_t buffer_size,
|
||||
lpword_t required_size_ptr) {
|
||||
uint16_t required_size = 0;
|
||||
X_STATUS result = xeExGetXConfigSetting(category, setting, buffer_ptr,
|
||||
buffer_size, &required_size);
|
||||
X_STATUS result =
|
||||
xeExGetXConfigSetting(static_cast<X_CONFIG_CATEGORY>(category.value()),
|
||||
setting, buffer_ptr, buffer_size, &required_size);
|
||||
|
||||
if (required_size_ptr) {
|
||||
*required_size_ptr = required_size;
|
||||
|
|
|
|||
|
|
@ -17,6 +17,20 @@ namespace xe {
|
|||
namespace kernel {
|
||||
namespace xboxkrnl {
|
||||
|
||||
enum X_CONFIG_CATEGORY : uint16_t {
|
||||
XCONFIG_STATIC_CATEGORY = 0x00,
|
||||
XCONFIG_STATISTIC_CATEGORY = 0x01,
|
||||
XCONFIG_SECURED_CATEGORY = 0x02,
|
||||
XCONFIG_USER_CATEGORY = 0x03,
|
||||
XCONFIG_XNET_MACHINE_ACCOUNT_CATEGORY = 0x04,
|
||||
XCONFIG_XNET_PARAMETERS_CATEGORY = 0x05,
|
||||
XCONFIG_MEDIA_CENTER_CATEGORY = 0x06,
|
||||
XCONFIG_CONSOLE_CATEGORY = 0x07,
|
||||
XCONFIG_DVD_CATEGORY = 0x08,
|
||||
XCONFIG_IPTV_CATEGORY = 0x09,
|
||||
XCONFIG_SYSTEM_CATEGORY = 0x0A
|
||||
};
|
||||
|
||||
// XCONFIG_SECURED_AV_REGION
|
||||
enum X_AV_REGION : uint32_t {
|
||||
NTSCM = 0x00400100,
|
||||
|
|
|
|||
Loading…
Reference in a new issue