summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/hid/hid_system_server.cpp
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-01 22:23:56 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2024-01-04 03:21:14 +0100
commit6a244465cef86d7329f12dd1dfd5d6fdd415a0ed (patch)
tree0b69faca9aee4ab31705d07d57e55a75b1b2a809 /src/core/hle/service/hid/hid_system_server.cpp
parentMerge pull request #12554 from german77/directconnect (diff)
downloadyuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.tar
yuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.tar.gz
yuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.tar.bz2
yuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.tar.lz
yuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.tar.xz
yuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.tar.zst
yuzu-6a244465cef86d7329f12dd1dfd5d6fdd415a0ed.zip
Diffstat (limited to 'src/core/hle/service/hid/hid_system_server.cpp')
-rw-r--r--src/core/hle/service/hid/hid_system_server.cpp38
1 files changed, 24 insertions, 14 deletions
diff --git a/src/core/hle/service/hid/hid_system_server.cpp b/src/core/hle/service/hid/hid_system_server.cpp
index 5cc88c4a1..4823de743 100644
--- a/src/core/hle/service/hid/hid_system_server.cpp
+++ b/src/core/hle/service/hid/hid_system_server.cpp
@@ -240,9 +240,12 @@ IHidSystemServer::~IHidSystemServer() {
};
void IHidSystemServer::ApplyNpadSystemCommonPolicy(HLERequestContext& ctx) {
- LOG_WARNING(Service_HID, "called");
+ IPC::RequestParser rp{ctx};
+ const auto applet_resource_user_id{rp.Pop<u64>()};
+
+ LOG_INFO(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
- GetResourceManager()->GetNpad()->ApplyNpadSystemCommonPolicy();
+ GetResourceManager()->GetNpad()->ApplyNpadSystemCommonPolicy(applet_resource_user_id);
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
@@ -271,9 +274,12 @@ void IHidSystemServer::GetLastActiveNpad(HLERequestContext& ctx) {
}
void IHidSystemServer::ApplyNpadSystemCommonPolicyFull(HLERequestContext& ctx) {
- LOG_WARNING(Service_HID, "called");
+ IPC::RequestParser rp{ctx};
+ const auto applet_resource_user_id{rp.Pop<u64>()};
- GetResourceManager()->GetNpad()->ApplyNpadSystemCommonPolicy();
+ LOG_INFO(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
+
+ GetResourceManager()->GetNpad()->ApplyNpadSystemCommonPolicyFull(applet_resource_user_id);
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ResultSuccess);
@@ -298,28 +304,32 @@ void IHidSystemServer::GetNpadFullKeyGripColor(HLERequestContext& ctx) {
void IHidSystemServer::GetMaskedSupportedNpadStyleSet(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
+ const auto applet_resource_user_id{rp.Pop<u64>()};
- LOG_INFO(Service_HID, "(STUBBED) called");
+ LOG_INFO(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
- Core::HID::NpadStyleSet supported_styleset =
- GetResourceManager()->GetNpad()->GetSupportedStyleSet().raw;
+ Core::HID::NpadStyleSet supported_styleset{};
+ const auto& npad = GetResourceManager()->GetNpad();
+ const Result result =
+ npad->GetMaskedSupportedNpadStyleSet(applet_resource_user_id, supported_styleset);
IPC::ResponseBuilder rb{ctx, 3};
- rb.Push(ResultSuccess);
+ rb.Push(result);
rb.PushEnum(supported_styleset);
}
void IHidSystemServer::SetSupportedNpadStyleSetAll(HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
+ const auto applet_resource_user_id{rp.Pop<u64>()};
- LOG_INFO(Service_HID, "(STUBBED) called");
+ LOG_DEBUG(Service_HID, "called, applet_resource_user_id={}", applet_resource_user_id);
- Core::HID::NpadStyleSet supported_styleset =
- GetResourceManager()->GetNpad()->GetSupportedStyleSet().raw;
+ const auto& npad = GetResourceManager()->GetNpad();
+ const auto result =
+ npad->SetSupportedNpadStyleSet(applet_resource_user_id, Core::HID::NpadStyleSet::All);
- IPC::ResponseBuilder rb{ctx, 3};
- rb.Push(ResultSuccess);
- rb.PushEnum(supported_styleset);
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(result);
}
void IHidSystemServer::GetAppletDetailedUiType(HLERequestContext& ctx) {