From 167bd9e110301a99053fe68aad6913dd6f63a0b1 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Mon, 18 Nov 2019 12:25:48 -0500 Subject: [PATCH] hid: Use ActivateNpadWithRevision with the sysver-specific revision value in _hidActivateNpad(), on [5.0.0+]. --- nx/source/services/hid.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/nx/source/services/hid.c b/nx/source/services/hid.c index f80d9252..069cd1d9 100644 --- a/nx/source/services/hid.c +++ b/nx/source/services/hid.c @@ -788,7 +788,18 @@ Result hidSetSupportedNpadIdType(HidControllerID *buf, size_t count) { } static Result _hidActivateNpad(void) { - return _hidCmdWithNoInput(103); + u32 revision=0x0; + + if (hosversionBefore(5,0,0)) + return _hidCmdWithNoInput(103); // ActivateNpad + + revision = 0x1; // [5.0.0+] + if (hosversionAtLeast(6,0,0)) + revision = 0x2; // [6.0.0+] + if (hosversionAtLeast(8,0,0)) + revision = 0x3; // [8.0.0+] + + return _hidCmdWithInputU32(revision, 109); // ActivateNpadWithRevision } static Result _hidDeactivateNpad(void) {