mirror of
https://github.com/yuzu-mirror/yuzu.git
synced 2024-11-08 08:09:58 +00:00
hid: Stub SetTouchScreenConfiguration
This commit is contained in:
parent
7e9163779d
commit
a7bbd37f81
3 changed files with 28 additions and 1 deletions
|
@ -15,6 +15,20 @@
|
||||||
namespace Service::HID {
|
namespace Service::HID {
|
||||||
class Controller_Touchscreen final : public ControllerBase {
|
class Controller_Touchscreen final : public ControllerBase {
|
||||||
public:
|
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_);
|
explicit Controller_Touchscreen(Core::System& system_);
|
||||||
~Controller_Touchscreen() override;
|
~Controller_Touchscreen() override;
|
||||||
|
|
||||||
|
|
|
@ -331,7 +331,7 @@ Hid::Hid(Core::System& system_)
|
||||||
{529, nullptr, "SetDisallowedPalmaConnection"},
|
{529, nullptr, "SetDisallowedPalmaConnection"},
|
||||||
{1000, &Hid::SetNpadCommunicationMode, "SetNpadCommunicationMode"},
|
{1000, &Hid::SetNpadCommunicationMode, "SetNpadCommunicationMode"},
|
||||||
{1001, &Hid::GetNpadCommunicationMode, "GetNpadCommunicationMode"},
|
{1001, &Hid::GetNpadCommunicationMode, "GetNpadCommunicationMode"},
|
||||||
{1002, nullptr, "SetTouchScreenConfiguration"},
|
{1002, &Hid::SetTouchScreenConfiguration, "SetTouchScreenConfiguration"},
|
||||||
{1003, nullptr, "IsFirmwareUpdateNeededForNotification"},
|
{1003, nullptr, "IsFirmwareUpdateNeededForNotification"},
|
||||||
{2000, nullptr, "ActivateDigitizer"},
|
{2000, nullptr, "ActivateDigitizer"},
|
||||||
};
|
};
|
||||||
|
@ -1631,6 +1631,18 @@ void Hid::GetNpadCommunicationMode(Kernel::HLERequestContext& ctx) {
|
||||||
.GetNpadCommunicationMode());
|
.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> {
|
class HidDbg final : public ServiceFramework<HidDbg> {
|
||||||
public:
|
public:
|
||||||
explicit HidDbg(Core::System& system_) : ServiceFramework{system_, "hid:dbg"} {
|
explicit HidDbg(Core::System& system_) : ServiceFramework{system_, "hid:dbg"} {
|
||||||
|
|
|
@ -159,6 +159,7 @@ private:
|
||||||
void SetPalmaBoostMode(Kernel::HLERequestContext& ctx);
|
void SetPalmaBoostMode(Kernel::HLERequestContext& ctx);
|
||||||
void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx);
|
void SetNpadCommunicationMode(Kernel::HLERequestContext& ctx);
|
||||||
void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx);
|
void GetNpadCommunicationMode(Kernel::HLERequestContext& ctx);
|
||||||
|
void SetTouchScreenConfiguration(Kernel::HLERequestContext& ctx);
|
||||||
|
|
||||||
enum class VibrationDeviceType : u32 {
|
enum class VibrationDeviceType : u32 {
|
||||||
Unknown = 0,
|
Unknown = 0,
|
||||||
|
|
Loading…
Reference in a new issue