From 277a241f33feb19a1ce20e55eed55f2eec73727c Mon Sep 17 00:00:00 2001 From: berichan <66521620+berichan@users.noreply.github.com> Date: Sat, 26 Mar 2022 14:31:33 +0000 Subject: [PATCH 1/2] yield lbl until required, bump version to 2.2 for when libnx is available --- sys-botbase/source/main.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sys-botbase/source/main.c b/sys-botbase/source/main.c index 2b8be00..4c9c8d4 100644 --- a/sys-botbase/source/main.c +++ b/sys-botbase/source/main.c @@ -107,12 +107,6 @@ void __appInit(void) rc = viInitialize(ViServiceType_Default); if (R_FAILED(rc)) fatalThrow(rc); - if (hosversionBefore(14,0,0)) // lbl max sessions when 14.0.0 - { - rc = lblInitialize(); - if (R_FAILED(rc)) - fatalThrow(rc); - } } void __appExit(void) @@ -486,7 +480,7 @@ int argmain(int argc, char **argv) } if(!strcmp(argv[0], "getVersion")){ - printf("2.11\n"); + printf("2.2\n"); } // follow pointers and print absolute offset (little endian, flip it yourself if required) @@ -800,8 +794,12 @@ int argmain(int argc, char **argv) rc = viSetDisplayPowerState(&temp_display, ViPowerState_NotScanning); // not scanning keeps the screen on but does not push new pixels to the display. Battery save is non-negligible and should be used where possible svcSleepThread(1e+6l); viCloseDisplay(&temp_display); - if (hosversionBefore(14,0,0)) - lblSwitchBacklightOff(1ul); + + rc = lblInitialize(); + if (R_FAILED(rc)) + fatalThrow(rc); + lblSwitchBacklightOff(1ul); + lblExit(); } } @@ -817,8 +815,12 @@ int argmain(int argc, char **argv) rc = viSetDisplayPowerState(&temp_display, ViPowerState_On); svcSleepThread(1e+6l); viCloseDisplay(&temp_display); - if (hosversionBefore(14,0,0)) - lblSwitchBacklightOn(1ul); + + rc = lblInitialize(); + if (R_FAILED(rc)) + fatalThrow(rc); + lblSwitchBacklightOn(1ul); + lblExit(); } } From c4c0496cc201541680ed04d1f335481842791081 Mon Sep 17 00:00:00 2001 From: berichan <66521620+berichan@users.noreply.github.com> Date: Fri, 8 Apr 2022 18:09:49 +0100 Subject: [PATCH 2/2] strip fs + seemingly unused inits --- sys-botbase/source/main.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/sys-botbase/source/main.c b/sys-botbase/source/main.c index 4c9c8d4..10d1f72 100644 --- a/sys-botbase/source/main.c +++ b/sys-botbase/source/main.c @@ -80,15 +80,6 @@ void __appInit(void) setsysExit(); } } - rc = fsInitialize(); - if (R_FAILED(rc)) - fatalThrow(rc); - rc = fsdevMountSdmc(); - if (R_FAILED(rc)) - fatalThrow(rc); - rc = timeInitialize(); - if (R_FAILED(rc)) - fatalThrow(rc); rc = pmdmntInitialize(); if (R_FAILED(rc)) fatalThrow(rc); @@ -111,14 +102,10 @@ void __appInit(void) void __appExit(void) { - fsdevUnmountAll(); - fsExit(); smExit(); audoutExit(); - timeExit(); socketExit(); viExit(); - lblExit(); } u64 mainLoopSleepTime = 50;