diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2024-02-01 17:33:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-01 17:33:44 +0100 |
commit | 21138b6a867632c56330a48a7389430ae2b6e321 (patch) | |
tree | 6be048ee977f29f4c132d0cfb0bcdb79a7c5966d /src/core/hle/service/set/system_settings_server.cpp | |
parent | Merge pull request #12870 from liamwhite/mac-ci (diff) | |
parent | service: hid: Restore active aruid (diff) | |
download | yuzu-21138b6a867632c56330a48a7389430ae2b6e321.tar yuzu-21138b6a867632c56330a48a7389430ae2b6e321.tar.gz yuzu-21138b6a867632c56330a48a7389430ae2b6e321.tar.bz2 yuzu-21138b6a867632c56330a48a7389430ae2b6e321.tar.lz yuzu-21138b6a867632c56330a48a7389430ae2b6e321.tar.xz yuzu-21138b6a867632c56330a48a7389430ae2b6e321.tar.zst yuzu-21138b6a867632c56330a48a7389430ae2b6e321.zip |
Diffstat (limited to 'src/core/hle/service/set/system_settings_server.cpp')
-rw-r--r-- | src/core/hle/service/set/system_settings_server.cpp | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cpp index d3d0fb112..7ef4a0ded 100644 --- a/src/core/hle/service/set/system_settings_server.cpp +++ b/src/core/hle/service/set/system_settings_server.cpp @@ -275,8 +275,8 @@ ISystemSettingsServer::ISystemSettingsServer(Core::System& system_) {184, nullptr, "SetPlatformRegion"}, {185, &ISystemSettingsServer::GetHomeMenuSchemeModel, "GetHomeMenuSchemeModel"}, {186, nullptr, "GetMemoryUsageRateFlag"}, - {187, nullptr, "GetTouchScreenMode"}, - {188, nullptr, "SetTouchScreenMode"}, + {187, &ISystemSettingsServer::GetTouchScreenMode, "GetTouchScreenMode"}, + {188, &ISystemSettingsServer::SetTouchScreenMode, "SetTouchScreenMode"}, {189, nullptr, "GetButtonConfigSettingsFull"}, {190, nullptr, "SetButtonConfigSettingsFull"}, {191, nullptr, "GetButtonConfigSettingsEmbedded"}, @@ -1395,6 +1395,28 @@ void ISystemSettingsServer::GetHomeMenuSchemeModel(HLERequestContext& ctx) { rb.Push(0); } +void ISystemSettingsServer::GetTouchScreenMode(HLERequestContext& ctx) { + TouchScreenMode touch_screen_mode{}; + auto res = GetTouchScreenMode(touch_screen_mode); + + LOG_INFO(Service_SET, "called, touch_screen_mode={}", touch_screen_mode); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(res); + rb.PushEnum(touch_screen_mode); +} + +void ISystemSettingsServer::SetTouchScreenMode(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto touch_screen_mode = rp.PopEnum<TouchScreenMode>(); + auto res = SetTouchScreenMode(touch_screen_mode); + + LOG_INFO(Service_SET, "called, touch_screen_mode={}", touch_screen_mode); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(res); +} + void ISystemSettingsServer::GetFieldTestingFlag(HLERequestContext& ctx) { LOG_INFO(Service_SET, "called, field_testing_flag={}", m_system_settings.field_testing_flag); @@ -1670,4 +1692,15 @@ Result ISystemSettingsServer::SetUserSystemClockAutomaticCorrectionUpdatedTime( R_SUCCEED(); } +Result ISystemSettingsServer::GetTouchScreenMode(TouchScreenMode& touch_screen_mode) const { + touch_screen_mode = m_system_settings.touch_screen_mode; + R_SUCCEED(); +} + +Result ISystemSettingsServer::SetTouchScreenMode(TouchScreenMode touch_screen_mode) { + m_system_settings.touch_screen_mode = touch_screen_mode; + SetSaveNeeded(); + R_SUCCEED(); +} + } // namespace Service::Set |