1
1
Fork 0
forked from suyu/suyu

set: add GetPlatformRegion

This commit is contained in:
Liam 2024-02-24 11:45:17 -05:00
parent a93d249ac1
commit 692ba0fa7d
6 changed files with 25 additions and 10 deletions

View file

@ -48,11 +48,6 @@ enum class SystemButtonType {
CaptureButtonLongPressing, CaptureButtonLongPressing,
}; };
enum class SysPlatformRegion : s32 {
Global = 1,
Terra = 2,
};
struct AppletProcessLaunchReason { struct AppletProcessLaunchReason {
u8 flag; u8 flag;
INSERT_PADDING_BYTES(3); INSERT_PADDING_BYTES(3);

View file

@ -260,9 +260,9 @@ Result ICommonStateGetter::GetAppletLaunchedHistory(
} }
Result ICommonStateGetter::GetSettingsPlatformRegion( Result ICommonStateGetter::GetSettingsPlatformRegion(
Out<SysPlatformRegion> out_settings_platform_region) { Out<Set::PlatformRegion> out_settings_platform_region) {
LOG_INFO(Service_AM, "called"); LOG_INFO(Service_AM, "called");
*out_settings_platform_region = SysPlatformRegion::Global; *out_settings_platform_region = Set::PlatformRegion::Global;
R_SUCCEED(); R_SUCCEED();
} }

View file

@ -8,6 +8,7 @@
#include "core/hle/service/cmif_types.h" #include "core/hle/service/cmif_types.h"
#include "core/hle/service/pm/pm.h" #include "core/hle/service/pm/pm.h"
#include "core/hle/service/service.h" #include "core/hle/service/service.h"
#include "core/hle/service/set/settings_types.h"
namespace Kernel { namespace Kernel {
class KReadableEvent; class KReadableEvent;
@ -50,7 +51,7 @@ private:
Result GetOperationModeSystemInfo(Out<u32> out_operation_mode_system_info); Result GetOperationModeSystemInfo(Out<u32> out_operation_mode_system_info);
Result GetAppletLaunchedHistory(Out<s32> out_count, Result GetAppletLaunchedHistory(Out<s32> out_count,
OutArray<AppletId, BufferAttr_HipcMapAlias> out_applet_ids); OutArray<AppletId, BufferAttr_HipcMapAlias> out_applet_ids);
Result GetSettingsPlatformRegion(Out<SysPlatformRegion> out_settings_platform_region); Result GetSettingsPlatformRegion(Out<Set::PlatformRegion> out_settings_platform_region);
Result SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled(); Result SetRequestExitToLibraryAppletAtExecuteNextProgramEnabled();
void SetCpuBoostMode(HLERequestContext& ctx); void SetCpuBoostMode(HLERequestContext& ctx);

View file

@ -243,6 +243,11 @@ enum class TvResolution : u32 {
Resolution480p, Resolution480p,
}; };
enum class PlatformRegion : s32 {
Global = 1,
Terra = 2,
};
constexpr std::array<LanguageCode, 18> available_language_codes = {{ constexpr std::array<LanguageCode, 18> available_language_codes = {{
LanguageCode::JA, LanguageCode::JA,
LanguageCode::EN_US, LanguageCode::EN_US,

View file

@ -272,8 +272,8 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_)
{180, nullptr, "SetZoomFlag"}, {180, nullptr, "SetZoomFlag"},
{181, nullptr, "GetT"}, {181, nullptr, "GetT"},
{182, nullptr, "SetT"}, {182, nullptr, "SetT"},
{183, nullptr, "GetPlatformRegion"}, {183, C<&ISystemSettingsServer::GetPlatformRegion>, "GetPlatformRegion"},
{184, nullptr, "SetPlatformRegion"}, {184, C<&ISystemSettingsServer::SetPlatformRegion>, "SetPlatformRegion"},
{185, C<&ISystemSettingsServer::GetHomeMenuSchemeModel>, "GetHomeMenuSchemeModel"}, {185, C<&ISystemSettingsServer::GetHomeMenuSchemeModel>, "GetHomeMenuSchemeModel"},
{186, nullptr, "GetMemoryUsageRateFlag"}, {186, nullptr, "GetMemoryUsageRateFlag"},
{187, C<&ISystemSettingsServer::GetTouchScreenMode>, "GetTouchScreenMode"}, {187, C<&ISystemSettingsServer::GetTouchScreenMode>, "GetTouchScreenMode"},
@ -1250,6 +1250,18 @@ Result ISystemSettingsServer::GetHomeMenuScheme(Out<HomeMenuScheme> out_home_men
R_SUCCEED(); R_SUCCEED();
} }
Result ISystemSettingsServer::GetPlatformRegion(Out<PlatformRegion> out_platform_region) {
LOG_WARNING(Service_SET, "(STUBBED) called");
*out_platform_region = PlatformRegion::Global;
R_SUCCEED();
}
Result ISystemSettingsServer::SetPlatformRegion(PlatformRegion platform_region) {
LOG_WARNING(Service_SET, "(STUBBED) called");
R_SUCCEED();
}
Result ISystemSettingsServer::GetHomeMenuSchemeModel(Out<u32> out_home_menu_scheme_model) { Result ISystemSettingsServer::GetHomeMenuSchemeModel(Out<u32> out_home_menu_scheme_model) {
LOG_WARNING(Service_SET, "(STUBBED) called"); LOG_WARNING(Service_SET, "(STUBBED) called");

View file

@ -149,6 +149,8 @@ public:
Result GetHomeMenuScheme(Out<HomeMenuScheme> out_home_menu_scheme); Result GetHomeMenuScheme(Out<HomeMenuScheme> out_home_menu_scheme);
Result GetHomeMenuSchemeModel(Out<u32> out_home_menu_scheme_model); Result GetHomeMenuSchemeModel(Out<u32> out_home_menu_scheme_model);
Result GetTouchScreenMode(Out<TouchScreenMode> out_touch_screen_mode); Result GetTouchScreenMode(Out<TouchScreenMode> out_touch_screen_mode);
Result GetPlatformRegion(Out<PlatformRegion> out_platform_region);
Result SetPlatformRegion(PlatformRegion platform_region);
Result SetTouchScreenMode(TouchScreenMode touch_screen_mode); Result SetTouchScreenMode(TouchScreenMode touch_screen_mode);
Result GetFieldTestingFlag(Out<bool> out_field_testing_flag); Result GetFieldTestingFlag(Out<bool> out_field_testing_flag);
Result GetPanelCrcMode(Out<s32> out_panel_crc_mode); Result GetPanelCrcMode(Out<s32> out_panel_crc_mode);