diff options
author | german77 <juangerman-13@hotmail.com> | 2021-09-10 17:09:22 +0200 |
---|---|---|
committer | german77 <juangerman-13@hotmail.com> | 2021-09-10 19:24:28 +0200 |
commit | a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e (patch) | |
tree | 8e4824b2423a0ed70e40aa0131988a4942279f2c /src/core | |
parent | Merge pull request #6962 from vonchenplus/spirv_support_legacy_attribute (diff) | |
download | yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.tar yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.tar.gz yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.tar.bz2 yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.tar.lz yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.tar.xz yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.tar.zst yuzu-a7bbd37f81999e486b629b6c2ee2ebe70c7eea2e.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/hid/controllers/touchscreen.h | 14 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.cpp | 14 | ||||
-rw-r--r-- | src/core/hle/service/hid/hid.h | 1 |
3 files changed, 28 insertions, 1 deletions
diff --git a/src/core/hle/service/hid/controllers/touchscreen.h b/src/core/hle/service/hid/controllers/touchscreen.h index ef2becefd..8e9b40c0a 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.h +++ b/src/core/hle/service/hid/controllers/touchscreen.h @@ -15,6 +15,20 @@ namespace Service::HID { class Controller_Touchscreen final : public ControllerBase { public: + enum class TouchScreenModeForNx : u8 { + UseSystemSetting, + Finger, + Heat2, + }; + + struct TouchScreenConfigurationForNx { + TouchScreenModeForNx mode; + INSERT_PADDING_BYTES_NOINIT(0x7); + INSERT_PADDING_BYTES_NOINIT(0xF); // Reserved + }; + static_assert(sizeof(TouchScreenConfigurationForNx) == 0x17, + "TouchScreenConfigurationForNx is an invalid size"); + explicit Controller_Touchscreen(Core::System& system_); ~Controller_Touchscreen() override; diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index b8b80570d..a1707a72a 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp @@ -331,7 +331,7 @@ Hid::Hid(Core::System& system_) {529, nullptr, "SetDisallowedPalmaConnection"}, {1000, &Hid::SetNpadCommunicationMode, "SetNpadCommunicationMode"}, {1001, &Hid::GetNpadCommunicationMode, "GetNpadCommunicationMode"}, - {1002, nullptr, "SetTouchScreenConfiguration"}, + {1002, &Hid::SetTouchScreenConfiguration, "SetTouchScreenConfiguration"}, {1003, nullptr, "IsFirmwareUpdateNeededForNotification"}, {2000, nullptr, "ActivateDigitizer"}, }; @@ -1631,6 +1631,18 @@ void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) { .GetNpadCommunicationMode()); } +void Hid::SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto touchscreen_mode{rp.PopRaw<Controller_Touchscreen::TouchScreenConfigurationForNx>()}; + const auto applet_resource_user_id{rp.Pop<u64>()}; + + LOG_WARNING(Service_HID, "(STUBBED) called, touchscreen_mode={}, applet_resource_user_id={}", + touchscreen_mode.mode, applet_resource_user_id); + + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); +} + class HidDbg final : public ServiceFramework<HidDbg> { public: explicit HidDbg(Core::System& system_) : ServiceFramework{system_, "hid:dbg"} { diff --git a/src/core/hle/service/hid/hid.h b/src/core/hle/service/hid/hid.h index 9c5c7f252..b1fe75e94 100644 --- a/src/core/hle/service/hid/hid.h +++ b/src/core/hle/service/hid/hid.h @@ -159,6 +159,7 @@ private: void SetPalmaBoostMode(Kernel::HLERequestContext& ctx); void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx); void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx); + void SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx); enum class VibrationDeviceType : u32 { Unknown = 0, |