From 4ac0a9ffdcc3e3dc84214199dfc5cc01e1f2016d Mon Sep 17 00:00:00 2001 From: yellows8 Date: Fri, 17 Sep 2021 11:48:09 -0400 Subject: [PATCH] hidsys: use hosversionBetween --- nx/source/services/hidsys.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nx/source/services/hidsys.c b/nx/source/services/hidsys.c index b3cdac3d..b5464151 100644 --- a/nx/source/services/hidsys.c +++ b/nx/source/services/hidsys.c @@ -678,56 +678,56 @@ Result hidsysIsButtonConfigStorageRightEmpty(s32 index, bool *out) { } Result hidsysGetButtonConfigStorageEmbeddedDeprecated(s32 index, HidcfgButtonConfigEmbedded *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32OutBufFixed((u32)index, config, sizeof(*config), 1259); } Result hidsysGetButtonConfigStorageFullDeprecated(s32 index, HidcfgButtonConfigFull *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32OutBufFixed((u32)index, config, sizeof(*config), 1260); } Result hidsysGetButtonConfigStorageLeftDeprecated(s32 index, HidcfgButtonConfigLeft *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32OutBufFixed((u32)index, config, sizeof(*config), 1261); } Result hidsysGetButtonConfigStorageRightDeprecated(s32 index, HidcfgButtonConfigRight *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32OutBufFixed((u32)index, config, sizeof(*config), 1262); } Result hidsysSetButtonConfigStorageEmbeddedDeprecated(s32 index, const HidcfgButtonConfigEmbedded *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32InBufFixedNoOut((u32)index, config, sizeof(*config), 1263); } Result hidsysSetButtonConfigStorageFullDeprecated(s32 index, const HidcfgButtonConfigFull *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32InBufFixedNoOut((u32)index, config, sizeof(*config), 1264); } Result hidsysSetButtonConfigStorageLeftDeprecated(s32 index, const HidcfgButtonConfigLeft *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32InBufFixedNoOut((u32)index, config, sizeof(*config), 1265); } Result hidsysSetButtonConfigStorageRightDeprecated(s32 index, const HidcfgButtonConfigRight *config) { - if (hosversionBefore(10,0,0) || hosversionAtLeast(13,0,0)) + if (!hosversionBetween(10,13)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer); return _hidsysCmdInU32InBufFixedNoOut((u32)index, config, sizeof(*config), 1266);