hid: Use ActivateNpadWithRevision with the sysver-specific revision value in _hidActivateNpad(), on [5.0.0+].

This commit is contained in:
yellows8 2019-11-18 12:25:48 -05:00
parent 70ddae58ff
commit 167bd9e110
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43

View File

@ -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) {