diff options
| author | 2024-01-04 11:53:10 -0600 | |
|---|---|---|
| committer | 2024-01-06 16:10:37 -0600 | |
| commit | 3dbe998f9b07c95bd8e938fbfecfeabc148eb2b9 (patch) | |
| tree | 08d7dc01325c31d56b7435fd49db7190bf10b25e /src/core | |
| parent | Merge pull request #12582 from german77/hid-core (diff) | |
| download | yuzu-3dbe998f9b07c95bd8e938fbfecfeabc148eb2b9.tar.gz yuzu-3dbe998f9b07c95bd8e938fbfecfeabc148eb2b9.tar.xz yuzu-3dbe998f9b07c95bd8e938fbfecfeabc148eb2b9.zip | |
service: hid: Add functions needed by Qlaunch
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/hle/service/hid/hid_system_server.cpp | 60 | ||||
| -rw-r--r-- | src/core/hle/service/hid/hid_system_server.h | 6 |
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 | ||
| 558 | void 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 | |||
| 558 | void IHidSystemServer::AcquireConnectionTriggerTimeoutEvent(HLERequestContext& ctx) { | 568 | void 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 | ||
| 654 | void IHidSystemServer::CheckFirmwareUpdateRequired(HLERequestContext& ctx) { | ||
| 655 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 656 | |||
| 657 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 658 | rb.Push(ResultSuccess); | ||
| 659 | } | ||
| 660 | |||
| 661 | void IHidSystemServer::SetFirmwareHotfixUpdateSkipEnabled(HLERequestContext& ctx) { | ||
| 662 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 663 | |||
| 664 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 665 | rb.Push(ResultSuccess); | ||
| 666 | } | ||
| 667 | |||
| 668 | void IHidSystemServer::InitializeUsbFirmwareUpdate(HLERequestContext& ctx) { | ||
| 669 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 670 | |||
| 671 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 672 | rb.Push(ResultSuccess); | ||
| 673 | } | ||
| 674 | |||
| 675 | void IHidSystemServer::FinalizeUsbFirmwareUpdate(HLERequestContext& ctx) { | ||
| 676 | LOG_WARNING(Service_HID, "(STUBBED) called"); | ||
| 677 | |||
| 678 | IPC::ResponseBuilder rb{ctx, 2}; | ||
| 679 | rb.Push(ResultSuccess); | ||
| 680 | } | ||
| 681 | |||
| 644 | void IHidSystemServer::InitializeUsbFirmwareUpdateWithoutMemory(HLERequestContext& ctx) { | 682 | void 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 | ||
| 706 | void 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 | |||
| 668 | std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() { | 716 | std::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 | ||