From bbfed7be66b3346ae471215b42042a97e3ad3156 Mon Sep 17 00:00:00 2001 From: Michael Scire Date: Wed, 2 Dec 2020 02:34:28 -0800 Subject: [PATCH] ams.mitm: fix old hid api references --- stratosphere/ams_mitm/source/hid_mitm/hid_mitm_service.cpp | 4 ++-- stratosphere/ams_mitm/source/hid_mitm/hid_shim.c | 6 +++--- stratosphere/ams_mitm/source/hid_mitm/hid_shim.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/stratosphere/ams_mitm/source/hid_mitm/hid_mitm_service.cpp b/stratosphere/ams_mitm/source/hid_mitm/hid_mitm_service.cpp index d516ab733..f4d220749 100644 --- a/stratosphere/ams_mitm/source/hid_mitm/hid_mitm_service.cpp +++ b/stratosphere/ams_mitm/source/hid_mitm/hid_mitm_service.cpp @@ -21,8 +21,8 @@ namespace ams::mitm::hid { Result HidMitmService::SetSupportedNpadStyleSet(const sf::ClientAppletResourceUserId &client_aruid, u32 style_set) { /* This code applies only to hbl, guaranteed by the check in ShouldMitm. */ - style_set |= TYPE_SYSTEM | TYPE_SYSTEM_EXT; - return hidSetSupportedNpadStyleSetFwd(this->forward_service.get(), static_cast(this->client_info.process_id), static_cast(client_aruid.GetValue()), static_cast(style_set)); + style_set |= HidNpadStyleTag_NpadSystem | HidNpadStyleTag_NpadSystemExt; + return hidSetSupportedNpadStyleSetFwd(this->forward_service.get(), static_cast(this->client_info.process_id), static_cast(client_aruid.GetValue()), style_set); } } diff --git a/stratosphere/ams_mitm/source/hid_mitm/hid_shim.c b/stratosphere/ams_mitm/source/hid_mitm/hid_shim.c index 908c99689..7652e937a 100644 --- a/stratosphere/ams_mitm/source/hid_mitm/hid_shim.c +++ b/stratosphere/ams_mitm/source/hid_mitm/hid_shim.c @@ -17,11 +17,11 @@ #include /* Command forwarders. */ -Result hidSetSupportedNpadStyleSetFwd(Service* s, u64 process_id, u64 aruid, HidControllerType type) { +Result hidSetSupportedNpadStyleSetFwd(Service* s, u64 process_id, u64 aruid, u32 style_set) { const struct { - u32 type; + u32 style_set; u32 pad; u64 aruid; - } in = { type, 0, aruid }; + } in = { style_set, 0, aruid }; return serviceMitmDispatchIn(s, 100, in, .in_send_pid = true, .override_pid = process_id); } diff --git a/stratosphere/ams_mitm/source/hid_mitm/hid_shim.h b/stratosphere/ams_mitm/source/hid_mitm/hid_shim.h index 6a16f8fc5..451981a50 100644 --- a/stratosphere/ams_mitm/source/hid_mitm/hid_shim.h +++ b/stratosphere/ams_mitm/source/hid_mitm/hid_shim.h @@ -12,7 +12,7 @@ extern "C" { #endif /* Command forwarders. */ -Result hidSetSupportedNpadStyleSetFwd(Service* s, u64 process_id, u64 aruid, HidControllerType type); +Result hidSetSupportedNpadStyleSetFwd(Service* s, u64 process_id, u64 aruid, u32 style_set); #ifdef __cplusplus }