From b5446846f7941c2f47ac1678d38fa92b5b81afab Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 9 Oct 2022 13:03:05 +0100 Subject: [PATCH] Stub IsSixAxisSensorAtRest --- app/src/main/cpp/skyline/services/hid/IHidServer.cpp | 5 +++++ app/src/main/cpp/skyline/services/hid/IHidServer.h | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/app/src/main/cpp/skyline/services/hid/IHidServer.cpp b/app/src/main/cpp/skyline/services/hid/IHidServer.cpp index ea0f1fa9..ac30b20d 100644 --- a/app/src/main/cpp/skyline/services/hid/IHidServer.cpp +++ b/app/src/main/cpp/skyline/services/hid/IHidServer.cpp @@ -41,6 +41,11 @@ namespace skyline::service::hid { return {}; } + Result IHidServer::IsSixAxisSensorAtRest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + response.Push(1); + return {}; + } + Result IHidServer::SetSupportedNpadStyleSet(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { auto styleSet{request.Pop()}; std::scoped_lock lock{state.input->npad.mutex}; diff --git a/app/src/main/cpp/skyline/services/hid/IHidServer.h b/app/src/main/cpp/skyline/services/hid/IHidServer.h index 070e8559..91ffd195 100644 --- a/app/src/main/cpp/skyline/services/hid/IHidServer.h +++ b/app/src/main/cpp/skyline/services/hid/IHidServer.h @@ -57,6 +57,11 @@ namespace skyline::service::hid { */ Result StopSixAxisSensor(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** + * @url https://switchbrew.org/wiki/HID_services#IsSixAxisSensorAtRest + */ + Result IsSixAxisSensorAtRest(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + /** * @brief Sets the style of controllers supported * @url https://switchbrew.org/wiki/HID_services#SetSupportedNpadStyleSet @@ -192,6 +197,7 @@ namespace skyline::service::hid { SFUNC(0x1F, IHidServer, ActivateKeyboard), SFUNC(0x42, IHidServer, StartSixAxisSensor), SFUNC(0x43, IHidServer, StopSixAxisSensor), + SFUNC(0x52, IHidServer, IsSixAxisSensorAtRest), SFUNC(0x64, IHidServer, SetSupportedNpadStyleSet), SFUNC(0x65, IHidServer, GetSupportedNpadStyleSet), SFUNC(0x66, IHidServer, SetSupportedNpadIdType),