Skip to content

Commit 4ecdb4f

Browse files
authored
Merge pull request #59 from berichan/master
2.2
2 parents d64db2a + c4c0496 commit 4ecdb4f

File tree

1 file changed

+13
-24
lines changed

1 file changed

+13
-24
lines changed

sys-botbase/source/main.c

+13-24
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,6 @@ void __appInit(void)
8080
setsysExit();
8181
}
8282
}
83-
rc = fsInitialize();
84-
if (R_FAILED(rc))
85-
fatalThrow(rc);
86-
rc = fsdevMountSdmc();
87-
if (R_FAILED(rc))
88-
fatalThrow(rc);
89-
rc = timeInitialize();
90-
if (R_FAILED(rc))
91-
fatalThrow(rc);
9283
rc = pmdmntInitialize();
9384
if (R_FAILED(rc))
9485
fatalThrow(rc);
@@ -107,24 +98,14 @@ void __appInit(void)
10798
rc = viInitialize(ViServiceType_Default);
10899
if (R_FAILED(rc))
109100
fatalThrow(rc);
110-
if (hosversionBefore(14,0,0)) // lbl max sessions when 14.0.0
111-
{
112-
rc = lblInitialize();
113-
if (R_FAILED(rc))
114-
fatalThrow(rc);
115-
}
116101
}
117102

118103
void __appExit(void)
119104
{
120-
fsdevUnmountAll();
121-
fsExit();
122105
smExit();
123106
audoutExit();
124-
timeExit();
125107
socketExit();
126108
viExit();
127-
lblExit();
128109
}
129110

130111
u64 mainLoopSleepTime = 50;
@@ -486,7 +467,7 @@ int argmain(int argc, char **argv)
486467
}
487468

488469
if(!strcmp(argv[0], "getVersion")){
489-
printf("2.11\n");
470+
printf("2.2\n");
490471
}
491472

492473
// follow pointers and print absolute offset (little endian, flip it yourself if required)
@@ -800,8 +781,12 @@ int argmain(int argc, char **argv)
800781
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
801782
svcSleepThread(1e+6l);
802783
viCloseDisplay(&temp_display);
803-
if (hosversionBefore(14,0,0))
804-
lblSwitchBacklightOff(1ul);
784+
785+
rc = lblInitialize();
786+
if (R_FAILED(rc))
787+
fatalThrow(rc);
788+
lblSwitchBacklightOff(1ul);
789+
lblExit();
805790
}
806791
}
807792

@@ -817,8 +802,12 @@ int argmain(int argc, char **argv)
817802
rc = viSetDisplayPowerState(&temp_display, ViPowerState_On);
818803
svcSleepThread(1e+6l);
819804
viCloseDisplay(&temp_display);
820-
if (hosversionBefore(14,0,0))
821-
lblSwitchBacklightOn(1ul);
805+
806+
rc = lblInitialize();
807+
if (R_FAILED(rc))
808+
fatalThrow(rc);
809+
lblSwitchBacklightOn(1ul);
810+
lblExit();
822811
}
823812
}
824813

0 commit comments

Comments
 (0)