Просмотр исходного кода

service: hid: Add IsAnyCustomButtonConfigEnabled for QLaunch

Narr the Reg 2 лет назад
Родитель
Сommit
98be02898b
2 измененных файлов с 12 добавлено и 1 удалено
  1. 11 1
      src/core/hle/service/hid/hid_system_server.cpp
  2. 1 0
      src/core/hle/service/hid/hid_system_server.h

+ 11 - 1
src/core/hle/service/hid/hid_system_server.cpp

@@ -201,7 +201,7 @@ IHidSystemServer::IHidSystemServer(Core::System& system_, std::shared_ptr<Resour
         {1269, nullptr, "DeleteButtonConfigStorageLeft"},
         {1269, nullptr, "DeleteButtonConfigStorageLeft"},
         {1270, nullptr, "DeleteButtonConfigStorageRight"},
         {1270, nullptr, "DeleteButtonConfigStorageRight"},
         {1271, &IHidSystemServer::IsUsingCustomButtonConfig, "IsUsingCustomButtonConfig"},
         {1271, &IHidSystemServer::IsUsingCustomButtonConfig, "IsUsingCustomButtonConfig"},
-        {1272, nullptr, "IsAnyCustomButtonConfigEnabled"},
+        {1272, &IHidSystemServer::IsAnyCustomButtonConfigEnabled, "IsAnyCustomButtonConfigEnabled"},
         {1273, nullptr, "SetAllCustomButtonConfigEnabled"},
         {1273, nullptr, "SetAllCustomButtonConfigEnabled"},
         {1274, nullptr, "SetDefaultButtonConfig"},
         {1274, nullptr, "SetDefaultButtonConfig"},
         {1275, nullptr, "SetAllDefaultButtonConfig"},
         {1275, nullptr, "SetAllDefaultButtonConfig"},
@@ -926,6 +926,16 @@ void IHidSystemServer::IsUsingCustomButtonConfig(HLERequestContext& ctx) {
     rb.Push(is_enabled);
     rb.Push(is_enabled);
 }
 }
 
 
+void IHidSystemServer::IsAnyCustomButtonConfigEnabled(HLERequestContext& ctx) {
+    const bool is_enabled = false;
+
+    LOG_DEBUG(Service_HID, "(STUBBED) called, is_enabled={}", is_enabled);
+
+    IPC::ResponseBuilder rb{ctx, 3};
+    rb.Push(ResultSuccess);
+    rb.Push(is_enabled);
+}
+
 std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() {
 std::shared_ptr<ResourceManager> IHidSystemServer::GetResourceManager() {
     resource_manager->Initialize();
     resource_manager->Initialize();
     return resource_manager;
     return resource_manager;

+ 1 - 0
src/core/hle/service/hid/hid_system_server.h

@@ -77,6 +77,7 @@ private:
     void GetTouchScreenDefaultConfiguration(HLERequestContext& ctx);
     void GetTouchScreenDefaultConfiguration(HLERequestContext& ctx);
     void SetForceHandheldStyleVibration(HLERequestContext& ctx);
     void SetForceHandheldStyleVibration(HLERequestContext& ctx);
     void IsUsingCustomButtonConfig(HLERequestContext& ctx);
     void IsUsingCustomButtonConfig(HLERequestContext& ctx);
+    void IsAnyCustomButtonConfigEnabled(HLERequestContext& ctx);
 
 
     std::shared_ptr<ResourceManager> GetResourceManager();
     std::shared_ptr<ResourceManager> GetResourceManager();