Skip to content

Commit

Permalink
Merge pull request #59 from berichan/master
Browse files Browse the repository at this point in the history
2.2
  • Loading branch information
berichan authored Apr 10, 2022
2 parents d64db2a + c4c0496 commit 4ecdb4f
Showing 1 changed file with 13 additions and 24 deletions.
37 changes: 13 additions & 24 deletions sys-botbase/source/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -107,24 +98,14 @@ 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)
{
fsdevUnmountAll();
fsExit();
smExit();
audoutExit();
timeExit();
socketExit();
viExit();
lblExit();
}

u64 mainLoopSleepTime = 50;
Expand Down Expand Up @@ -486,7 +467,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)
Expand Down Expand Up @@ -800,8 +781,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();
}
}

Expand All @@ -817,8 +802,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();
}
}

Expand Down

0 comments on commit 4ecdb4f

Please sign in to comment.