summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar liamwhite2024-01-06 21:51:29 -0500
committerGravatar GitHub2024-01-06 21:51:29 -0500
commitb71840bbd2e88a88852cad806f600e59e01d70c9 (patch)
tree99e0fb71e9e9fdc0b9a2a6bf2354ee0b04d23d00 /src
parentMerge pull request #12593 from german77/pending-delete (diff)
parentservice: hid: Add functions needed by Qlaunch (diff)
downloadyuzu-b71840bbd2e88a88852cad806f600e59e01d70c9.tar.gz
yuzu-b71840bbd2e88a88852cad806f600e59e01d70c9.tar.xz
yuzu-b71840bbd2e88a88852cad806f600e59e01d70c9.zip
Merge pull request #12596 from german77/hid_qlaunch
service: hid: Add functions needed by QLaunch
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/hid/hid_system_server.cpp60
-rw-r--r--src/core/hle/service/hid/hid_system_server.h6
2 files changed, 60 insertions, 6 deletions
diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp
index 027c56025..2a65615e8 100644
--- a/src/core/hle/service/hid/hid_system_server.cpp
+++ b/src/core/hle/service/hid/hid_system_server.cpp
@@ -81,7 +81,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
81 {522, nullptr, "SetJoyConRailEnabled"}, 81 {522, nullptr, "SetJoyConRailEnabled"},
82 {523, nullptr, "IsJoyConRailEnabled"}, 82 {523, nullptr, "IsJoyConRailEnabled"},
83 {524, nullptr, "IsHandheldHidsEnabled"}, 83 {524, nullptr, "IsHandheldHidsEnabled"},
84 {525, nullptr, "IsJoyConAttachedOnAllRail"}, 84 {525, &IHidSystemServer::IsJoyConAttachedOnAllRail, "IsJoyConAttachedOnAllRail"},
85 {540, nullptr, "AcquirePlayReportControllerUsageUpdateEvent"}, 85 {540, nullptr, "AcquirePlayReportControllerUsageUpdateEvent"},
86 {541, nullptr, "GetPlayReportControllerUsages"}, 86 {541, nullptr, "GetPlayReportControllerUsages"},
87 {542, nullptr, "AcquirePlayReportRegisteredDeviceUpdateEvent"}, 87 {542, nullptr, "AcquirePlayReportRegisteredDeviceUpdateEvent"},
@@ -131,7 +131,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
131 {1001, nullptr, "GetFirmwareVersion"}, 131 {1001, nullptr, "GetFirmwareVersion"},
132 {1002, nullptr, "GetAvailableFirmwareVersion"}, 132 {1002, nullptr, "GetAvailableFirmwareVersion"},
133 {1003, nullptr, "IsFirmwareUpdateAvailable"}, 133 {1003, nullptr, "IsFirmwareUpdateAvailable"},
134 {1004, nullptr, "CheckFirmwareUpdateRequired"}, 134 {1004, &IHidSystemServer::CheckFirmwareUpdateRequired, "CheckFirmwareUpdateRequired"},
135 {1005, nullptr, "StartFirmwareUpdate"}, 135 {1005, nullptr, "StartFirmwareUpdate"},
136 {1006, nullptr, "AbortFirmwareUpdate"}, 136 {1006, nullptr, "AbortFirmwareUpdate"},
137 {1007, nullptr, "GetFirmwareUpdateState"}, 137 {1007, nullptr, "GetFirmwareUpdateState"},
@@ -144,9 +144,9 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
144 {1052, nullptr, "CancelSixAxisSensorAccurateUserCalibration"}, 144 {1052, nullptr, "CancelSixAxisSensorAccurateUserCalibration"},
145 {1053, nullptr, "GetSixAxisSensorAccurateUserCalibrationState"}, 145 {1053, nullptr, "GetSixAxisSensorAccurateUserCalibrationState"},
146 {1100, nullptr, "GetHidbusSystemServiceObject"}, 146 {1100, nullptr, "GetHidbusSystemServiceObject"},
147 {1120, nullptr, "SetFirmwareHotfixUpdateSkipEnabled"}, 147 {1120, &IHidSystemServer::SetFirmwareHotfixUpdateSkipEnabled, "SetFirmwareHotfixUpdateSkipEnabled"},
148 {1130, nullptr, "InitializeUsbFirmwareUpdate"}, 148 {1130, &IHidSystemServer::InitializeUsbFirmwareUpdate, "InitializeUsbFirmwareUpdate"},
149 {1131, nullptr, "FinalizeUsbFirmwareUpdate"}, 149 {1131, &IHidSystemServer::FinalizeUsbFirmwareUpdate, "FinalizeUsbFirmwareUpdate"},
150 {1132, nullptr, "CheckUsbFirmwareUpdateRequired"}, 150 {1132, nullptr, "CheckUsbFirmwareUpdateRequired"},
151 {1133, nullptr, "StartUsbFirmwareUpdate"}, 151 {1133, nullptr, "StartUsbFirmwareUpdate"},
152 {1134, nullptr, "GetUsbFirmwareUpdateState"}, 152 {1134, nullptr, "GetUsbFirmwareUpdateState"},
@@ -196,7 +196,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
196 {1268, nullptr, "DeleteButtonConfigStorageFull"}, 196 {1268, nullptr, "DeleteButtonConfigStorageFull"},
197 {1269, nullptr, "DeleteButtonConfigStorageLeft"}, 197 {1269, nullptr, "DeleteButtonConfigStorageLeft"},
198 {1270, nullptr, "DeleteButtonConfigStorageRight"}, 198 {1270, nullptr, "DeleteButtonConfigStorageRight"},
199 {1271, nullptr, "IsUsingCustomButtonConfig"}, 199 {1271, &IHidSystemServer::IsUsingCustomButtonConfig, "IsUsingCustomButtonConfig"},
200 {1272, nullptr, "IsAnyCustomButtonConfigEnabled"}, 200 {1272, nullptr, "IsAnyCustomButtonConfigEnabled"},
201 {1273, nullptr, "SetAllCustomButtonConfigEnabled"}, 201 {1273, nullptr, "SetAllCustomButtonConfigEnabled"},
202 {1274, nullptr, "SetDefaultButtonConfig"}, 202 {1274, nullptr, "SetDefaultButtonConfig"},
@@ -555,6 +555,16 @@ void IHidSystemServer::EnableAppletToGetTouchScreen(HLERequestContext& ctx) {
555 rb.Push(ResultSuccess); 555 rb.Push(ResultSuccess);
556} 556}
557 557
558void IHidSystemServer::IsJoyConAttachedOnAllRail(HLERequestContext& ctx) {
559 const bool is_attached = true;
560
561 LOG_DEBUG(Service_HID, "(STUBBED) called, is_attached={}", is_attached);
562
563 IPC::ResponseBuilder rb{ctx, 3};
564 rb.Push(ResultSuccess);
565 rb.Push(is_attached);
566}
567
558void IHidSystemServer::AcquireConnectionTriggerTimeoutEvent(HLERequestContext& ctx) { 568void IHidSystemServer::AcquireConnectionTriggerTimeoutEvent(HLERequestContext& ctx) {
559 LOG_INFO(Service_AM, "(STUBBED) called"); 569 LOG_INFO(Service_AM, "(STUBBED) called");
560 570
@@ -641,6 +651,34 @@ void IHidSystemServer::InitializeFirmwareUpdate(HLERequestContext& ctx) {
641 rb.Push(ResultSuccess); 651 rb.Push(ResultSuccess);
642} 652}
643 653
654void IHidSystemServer::CheckFirmwareUpdateRequired(HLERequestContext& ctx) {
655 LOG_WARNING(Service_HID, "(STUBBED) called");
656
657 IPC::ResponseBuilder rb{ctx, 2};
658 rb.Push(ResultSuccess);
659}
660
661void IHidSystemServer::SetFirmwareHotfixUpdateSkipEnabled(HLERequestContext& ctx) {
662 LOG_WARNING(Service_HID, "(STUBBED) called");
663
664 IPC::ResponseBuilder rb{ctx, 2};
665 rb.Push(ResultSuccess);
666}
667
668void IHidSystemServer::InitializeUsbFirmwareUpdate(HLERequestContext& ctx) {
669 LOG_WARNING(Service_HID, "(STUBBED) called");
670
671 IPC::ResponseBuilder rb{ctx, 2};
672 rb.Push(ResultSuccess);
673}
674
675void IHidSystemServer::FinalizeUsbFirmwareUpdate(HLERequestContext& ctx) {
676 LOG_WARNING(Service_HID, "(STUBBED) called");
677
678 IPC::ResponseBuilder rb{ctx, 2};
679 rb.Push(ResultSuccess);
680}
681
644void IHidSystemServer::InitializeUsbFirmwareUpdateWithoutMemory(HLERequestContext& ctx) { 682void IHidSystemServer::InitializeUsbFirmwareUpdateWithoutMemory(HLERequestContext& ctx) {
645 LOG_WARNING(Service_HID, "(STUBBED) called"); 683 LOG_WARNING(Service_HID, "(STUBBED) called");
646 684
@@ -665,6 +703,16 @@ void IHidSystemServer::GetTouchScreenDefaultConfiguration(HLERequestContext& ctx
665 rb.PushRaw(touchscreen_config); 703 rb.PushRaw(touchscreen_config);
666} 704}
667 705
706void IHidSystemServer::IsUsingCustomButtonConfig(HLERequestContext& ctx) {
707 const bool is_enabled = false;
708
709 LOG_DEBUG(Service_HID, "(STUBBED) called, is_enabled={}", is_enabled);
710
711 IPC::ResponseBuilder rb{ctx, 3};
712 rb.Push(ResultSuccess);
713 rb.Push(is_enabled);
714}
715
668std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() { 716std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() {
669 resource_manager->Initialize(); 717 resource_manager->Initialize();
670 return resource_manager; 718 return resource_manager;
diff --git a/src/core/hle/service/hid/hid_system_server.h b/src/core/hle/service/hid/hid_system_server.h
index 1e623dfc2..f467e2aa8 100644
--- a/src/core/hle/service/hid/hid_system_server.h
+++ b/src/core/hle/service/hid/hid_system_server.h
@@ -44,6 +44,7 @@ private:
44 void EnableAppletToGetSixAxisSensor(HLERequestContext& ctx); 44 void EnableAppletToGetSixAxisSensor(HLERequestContext& ctx);
45 void EnableAppletToGetPadInput(HLERequestContext& ctx); 45 void EnableAppletToGetPadInput(HLERequestContext& ctx);
46 void EnableAppletToGetTouchScreen(HLERequestContext& ctx); 46 void EnableAppletToGetTouchScreen(HLERequestContext& ctx);
47 void IsJoyConAttachedOnAllRail(HLERequestContext& ctx);
47 void AcquireConnectionTriggerTimeoutEvent(HLERequestContext& ctx); 48 void AcquireConnectionTriggerTimeoutEvent(HLERequestContext& ctx);
48 void AcquireDeviceRegisteredEventForControllerSupport(HLERequestContext& ctx); 49 void AcquireDeviceRegisteredEventForControllerSupport(HLERequestContext& ctx);
49 void GetRegisteredDevices(HLERequestContext& ctx); 50 void GetRegisteredDevices(HLERequestContext& ctx);
@@ -53,8 +54,13 @@ private:
53 void IsUsbFullKeyControllerEnabled(HLERequestContext& ctx); 54 void IsUsbFullKeyControllerEnabled(HLERequestContext& ctx);
54 void IsHandheldButtonPressedOnConsoleMode(HLERequestContext& ctx); 55 void IsHandheldButtonPressedOnConsoleMode(HLERequestContext& ctx);
55 void InitializeFirmwareUpdate(HLERequestContext& ctx); 56 void InitializeFirmwareUpdate(HLERequestContext& ctx);
57 void CheckFirmwareUpdateRequired(HLERequestContext& ctx);
58 void SetFirmwareHotfixUpdateSkipEnabled(HLERequestContext& ctx);
59 void InitializeUsbFirmwareUpdate(HLERequestContext& ctx);
60 void FinalizeUsbFirmwareUpdate(HLERequestContext& ctx);
56 void InitializeUsbFirmwareUpdateWithoutMemory(HLERequestContext& ctx); 61 void InitializeUsbFirmwareUpdateWithoutMemory(HLERequestContext& ctx);
57 void GetTouchScreenDefaultConfiguration(HLERequestContext& ctx); 62 void GetTouchScreenDefaultConfiguration(HLERequestContext& ctx);
63 void IsUsingCustomButtonConfig(HLERequestContext& ctx);
58 64
59 std::shared_ptr<ResourceManager> GetResourceManager(); 65 std::shared_ptr<ResourceManager> GetResourceManager();
60 66