mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
irs: Fixed the sysver handling in _irsInitialize(), previously only the values for [4.0.0+] would be used when running on [4.0.0+].
This commit is contained in:
parent
966edb1f0f
commit
ca6a48d2b6
@ -68,26 +68,22 @@ Result _irsInitialize(void) {
|
|||||||
|
|
||||||
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x3, .minor_version = 0xB};
|
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};
|
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x4, .minor_version = 0x12};
|
||||||
}
|
if (hosversionAtLeast(5,0,0))
|
||||||
else if (hosversionAtLeast(5,0,0)) {
|
|
||||||
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x5, .minor_version = 0x18};
|
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x5, .minor_version = 0x18};
|
||||||
}
|
if (hosversionAtLeast(6,0,0))
|
||||||
else if (hosversionAtLeast(6,0,0)) {
|
|
||||||
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x6, .minor_version = 0x1A};
|
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x6, .minor_version = 0x1A};
|
||||||
}
|
if (hosversionAtLeast(8,0,0))
|
||||||
else if (hosversionAtLeast(8,0,0)) {
|
|
||||||
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x8, .minor_version = 0x1B};
|
g_irsRequiredMcuVersion = (IrsPackedMcuVersion){.major_version = 0x8, .minor_version = 0x1B};
|
||||||
}
|
|
||||||
|
|
||||||
g_irsFunctionLevel.ir_sensor_function_level = 0x0;
|
g_irsFunctionLevel.ir_sensor_function_level = 0x0;
|
||||||
|
|
||||||
if (hosversionAtLeast(4,0,0))
|
if (hosversionAtLeast(4,0,0))
|
||||||
g_irsFunctionLevel.ir_sensor_function_level = 0x1;
|
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;
|
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;
|
g_irsFunctionLevel.ir_sensor_function_level = 0x3;
|
||||||
|
|
||||||
rc = smGetService(&g_irsSrv, "irs");
|
rc = smGetService(&g_irsSrv, "irs");
|
||||||
|
Loading…
Reference in New Issue
Block a user