diff options
Diffstat (limited to 'src')
| -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 @@ | |||
| 15 | namespace Service::HID { | 15 | namespace Service::HID { |
| 16 | class Controller_Touchscreen final : public ControllerBase { | 16 | class Controller_Touchscreen final : public ControllerBase { |
| 17 | public: | 17 | public: |
| 18 | enum class TouchScreenModeForNx : u8 { | ||
| 19 | UseSystemSetting, | ||
| 20 | Finger, | ||
| 21 | Heat2, | ||
| 22 | }; | ||
| 23 | |||
| 24 | struct TouchScreenConfigurationForNx { | ||
| 25 | TouchScreenModeForNx mode; | ||
| 26 | INSERT_PADDING_BYTES_NOINIT(0x7); | ||
| 27 | INSERT_PADDING_BYTES_NOINIT(0xF); // Reserved | ||
| 28 | }; | ||
| 29 | static_assert(sizeof(TouchScreenConfigurationForNx) == 0x17, | ||
| 30 | "TouchScreenConfigurationForNx is an invalid size"); | ||
| 31 | |||
| 18 | explicit Controller_Touchscreen(Core::System& system_); | 32 | explicit Controller_Touchscreen(Core::System& system_); |
| 19 | ~Controller_Touchscreen() override; | 33 | ~Controller_Touchscreen() override; |
| 20 | 34 | ||
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_) | |||
| 331 | {529, nullptr, "SetDisallowedPalmaConnection"}, | 331 | {529, nullptr, "SetDisallowedPalmaConnection"}, |
| 332 | {1000, &Hid::SetNpadCommunicationMode, "SetNpadCommunicationMode"}, | 332 | {1000, &Hid::SetNpadCommunicationMode, "SetNpadCommunicationMode"}, |
| 333 | {1001, &Hid::GetNpadCommunicationMode, "GetNpadCommunicationMode"}, | 333 | {1001, &Hid::GetNpadCommunicationMode, "GetNpadCommunicationMode"}, |
| 334 | {1002, nullptr, "SetTouchScreenConfiguration"}, | 334 | {1002, &Hid::SetTouchScreenConfiguration, "SetTouchScreenConfiguration"}, |
| 335 | {1003, nullptr, "IsFirmwareUpdateNeededForNotification"}, | 335 | {1003, nullptr, "IsFirmwareUpdateNeededForNotification"}, |
| 336 | {2000, nullptr, "ActivateDigitizer"}, | 336 | {2000, nullptr, "ActivateDigitizer"}, |
| 337 | }; | 337 | }; |
| @@ -1631,6 +1631,18 @@ void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) { | |||
| 1631 | .GetNpadCommunicationMode()); | 1631 | .GetNpadCommunicationMode()); |
| 1632 | } | 1632 | } |
| 1633 | 1633 | ||
| 1634 | void Hid::SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx) { | ||
| 1635 | IPC::RequestParser rp{ctx}; | ||
| 1636 | const auto touchscreen_mode{rp.PopRaw<Controller_Touchscreen::TouchScreenConfigurationForNx>()}; | ||
| 1637 | const auto applet_resource_user_id{rp.Pop<u64>()}; | ||
| 1638 | |||
| 1639 | LOG_WARNING(Service_HID, "(STUBBED) called, touchscreen_mode={}, applet_resource_user_id={}", | ||
| 1640 | touchscreen_mode.mode, applet_resource_user_id); | ||
| 1641 | |||
| 1642 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 1643 | rb.Push(ResultSuccess); | ||
| 1644 | } | ||
| 1645 | |||
| 1634 | class HidDbg final : public ServiceFramework<HidDbg> { | 1646 | class HidDbg final : public ServiceFramework<HidDbg> { |
| 1635 | public: | 1647 | public: |
| 1636 | explicit HidDbg(Core::System& system_) : ServiceFramework{system_, "hid:dbg"} { | 1648 | 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: | |||
| 159 | void SetPalmaBoostMode(Kernel::HLERequestContext& ctx); | 159 | void SetPalmaBoostMode(Kernel::HLERequestContext& ctx); |
| 160 | void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx); | 160 | void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx); |
| 161 | void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx); | 161 | void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx); |
| 162 | void SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx); | ||
| 162 | 163 | ||
| 163 | enum class VibrationDeviceType : u32 { | 164 | enum class VibrationDeviceType : u32 { |
| 164 | Unknown = 0, | 165 | Unknown = 0, |