hidsys: use hosversionBetween

This commit is contained in:
Michael Scire 2024-05-30 12:37:42 -07:00 committed by fincs
parent 510d85bf48
commit bb65fec6eb

View File

@ -497,14 +497,14 @@ Result hidsysLegacyIsButtonConfigSupported(HidsysUniquePadId unique_pad_id, bool
} }
Result hidsysIsButtonConfigSupported(BtdrvAddress addr, bool *out) { Result hidsysIsButtonConfigSupported(BtdrvAddress addr, bool *out) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrOutBool(addr, out, 1200); return _hidsysCmdInAddrOutBool(addr, out, 1200);
} }
Result hidsysIsButtonConfigEmbeddedSupported(bool *out) { Result hidsysIsButtonConfigEmbeddedSupported(bool *out) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdNoInOutBool(out, 1201); return _hidsysCmdNoInOutBool(out, 1201);
@ -518,14 +518,14 @@ Result hidsysLegacyDeleteButtonConfig(HidsysUniquePadId unique_pad_id) {
} }
Result hidsysDeleteButtonConfig(BtdrvAddress addr) { Result hidsysDeleteButtonConfig(BtdrvAddress addr) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrNoOut(addr, 1202); return _hidsysCmdInAddrNoOut(addr, 1202);
} }
Result hidsysDeleteButtonConfigEmbedded(void) { Result hidsysDeleteButtonConfigEmbedded(void) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdNoIO(1203); return _hidsysCmdNoIO(1203);
@ -539,14 +539,14 @@ Result hidsysLegacySetButtonConfigEnabled(HidsysUniquePadId unique_pad_id, bool
} }
Result hidsysSetButtonConfigEnabled(BtdrvAddress addr, bool flag) { Result hidsysSetButtonConfigEnabled(BtdrvAddress addr, bool flag) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrInBoolNoOut(addr, flag, 1204); return _hidsysCmdInAddrInBoolNoOut(addr, flag, 1204);
} }
Result hidsysSetButtonConfigEmbeddedEnabled(bool flag) { Result hidsysSetButtonConfigEmbeddedEnabled(bool flag) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInBoolNoOut(flag, 1205); return _hidsysCmdInBoolNoOut(flag, 1205);
@ -560,14 +560,14 @@ Result hidsysLegacyIsButtonConfigEnabled(HidsysUniquePadId unique_pad_id, bool *
} }
Result hidsysIsButtonConfigEnabled(BtdrvAddress addr, bool *out) { Result hidsysIsButtonConfigEnabled(BtdrvAddress addr, bool *out) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrInBoolNoOut(addr, out, 1206); return _hidsysCmdInAddrInBoolNoOut(addr, out, 1206);
} }
Result hidsysIsButtonConfigEmbeddedEnabled(bool *out) { Result hidsysIsButtonConfigEmbeddedEnabled(bool *out) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdNoInOutBool(out, 1207); return _hidsysCmdNoInOutBool(out, 1207);
@ -581,7 +581,7 @@ Result hidsysLegacySetButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, cons
} }
Result hidsysSetButtonConfigEmbedded(const HidsysButtonConfigEmbedded *config) { Result hidsysSetButtonConfigEmbedded(const HidsysButtonConfigEmbedded *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return serviceDispatch(&g_hidsysSrv, 1208, return serviceDispatch(&g_hidsysSrv, 1208,
@ -598,7 +598,7 @@ Result hidsysLegacySetButtonConfigFull(HidsysUniquePadId unique_pad_id, const Hi
} }
Result hidsysSetButtonConfigFull(BtdrvAddress addr, const HidsysButtonConfigFull *config) { Result hidsysSetButtonConfigFull(BtdrvAddress addr, const HidsysButtonConfigFull *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrInBufFixedNoOut(addr, config, sizeof(*config), 1209); return _hidsysCmdInAddrInBufFixedNoOut(addr, config, sizeof(*config), 1209);
@ -612,7 +612,7 @@ Result hidsysLegacySetButtonConfigLeft(HidsysUniquePadId unique_pad_id, const Hi
} }
Result hidsysSetButtonConfigLeft(BtdrvAddress addr, const HidsysButtonConfigLeft *config) { Result hidsysSetButtonConfigLeft(BtdrvAddress addr, const HidsysButtonConfigLeft *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrInBufFixedNoOut(addr, config, sizeof(*config), 12010); return _hidsysCmdInAddrInBufFixedNoOut(addr, config, sizeof(*config), 12010);
@ -626,7 +626,7 @@ Result hidsysLegacySetButtonConfigRight(HidsysUniquePadId unique_pad_id, const H
} }
Result hidsysSetButtonConfigRight(BtdrvAddress addr, const HidsysButtonConfigRight *config) { Result hidsysSetButtonConfigRight(BtdrvAddress addr, const HidsysButtonConfigRight *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrInBufFixedNoOut(addr, config, sizeof(*config), 1211); return _hidsysCmdInAddrInBufFixedNoOut(addr, config, sizeof(*config), 1211);
@ -640,7 +640,7 @@ Result hidsysLegacyGetButtonConfigEmbedded(HidsysUniquePadId unique_pad_id, Hids
} }
Result hidsysGetButtonConfigEmbedded(HidsysButtonConfigEmbedded *config) { Result hidsysGetButtonConfigEmbedded(HidsysButtonConfigEmbedded *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return serviceDispatch(&g_hidsysSrv, 1212, return serviceDispatch(&g_hidsysSrv, 1212,
@ -657,7 +657,7 @@ Result hidsysLegacyGetButtonConfigFull(HidsysUniquePadId unique_pad_id, HidsysBu
} }
Result hidsysGetButtonConfigFull(BtdrvAddress addr, HidsysButtonConfigFull *config) { Result hidsysGetButtonConfigFull(BtdrvAddress addr, HidsysButtonConfigFull *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrOutBufFixedNoOut(addr, config, sizeof(*config), 1213); return _hidsysCmdInAddrOutBufFixedNoOut(addr, config, sizeof(*config), 1213);
@ -671,7 +671,7 @@ Result hidsysLegacyGetButtonConfigLeft(HidsysUniquePadId unique_pad_id, HidsysBu
} }
Result hidsysGetButtonConfigLeft(BtdrvAddress addr, HidsysButtonConfigLeft *config) { Result hidsysGetButtonConfigLeft(BtdrvAddress addr, HidsysButtonConfigLeft *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrOutBufFixedNoOut(addr, config, sizeof(*config), 1214); return _hidsysCmdInAddrOutBufFixedNoOut(addr, config, sizeof(*config), 1214);
@ -685,7 +685,7 @@ Result hidsysLegacyGetButtonConfigRight(HidsysUniquePadId unique_pad_id, HidsysB
} }
Result hidsysGetButtonConfigRight(BtdrvAddress addr, HidsysButtonConfigRight *config) { Result hidsysGetButtonConfigRight(BtdrvAddress addr, HidsysButtonConfigRight *config) {
if (hosversionBefore(11,0,0) || hosversionAtLeast(18,0,0)) if (!hosversionBetween(11,18))
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
return _hidsysCmdInAddrOutBufFixedNoOut(addr, config, sizeof(*config), 1215); return _hidsysCmdInAddrOutBufFixedNoOut(addr, config, sizeof(*config), 1215);