From ca6a48d2b6f0ab2bc9c39e078e960d074c30f96e Mon Sep 17 00:00:00 2001 From: yellows8 Date: Sat, 11 Apr 2020 23:16:20 -0400 Subject: [PATCH] irs: Fixed the sysver handling in _irsInitialize(), previously only the values for [4.0.0+] would be used when running on [4.0.0+]. --- nx/source/services/irs.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/nx/source/services/irs.c b/nx/source/services/irs.c index 9a802b7c..90617074 100644 --- a/nx/source/services/irs.c +++ b/nx/source/services/irs.c @@ -68,26 +68,22 @@ Result _irsInitialize(void) { g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x3, .minor_version = 0xB}; - if (hosversionAtLeast(4,0,0)) { + if (hosversionAtLeast(4,0,0)) g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x4, .minor_version = 0x12}; - } - else if (hosversionAtLeast(5,0,0)) { + if (hosversionAtLeast(5,0,0)) g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x5, .minor_version = 0x18}; - } - else if (hosversionAtLeast(6,0,0)) { + if (hosversionAtLeast(6,0,0)) g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x6, .minor_version = 0x1A}; - } - else if (hosversionAtLeast(8,0,0)) { + if (hosversionAtLeast(8,0,0)) g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x8, .minor_version = 0x1B}; - } g_irsFunctionLevel.ir_sensor_function_level = 0x0; if (hosversionAtLeast(4,0,0)) g_irsFunctionLevel.ir_sensor_function_level = 0x1; - else if (hosversionAtLeast(5,0,0)) + if (hosversionAtLeast(5,0,0)) g_irsFunctionLevel.ir_sensor_function_level = 0x2; - else if (hosversionAtLeast(6,0,0)) + if (hosversionAtLeast(6,0,0)) g_irsFunctionLevel.ir_sensor_function_level = 0x3; rc = smGetService(&g_irsSrv, "irs");