boot: refactor battery checking to use new powctl apis

This commit is contained in:
Michael Scire 2020-11-08 04:16:50 -08:00 committed by SciresM
parent 485304bd17
commit 708f5bf1fb
44 changed files with 1426 additions and 1554 deletions

View file

@ -29,8 +29,8 @@ namespace ams::boot {
}
void ShowSplashScreen() {
const u32 boot_reason = GetBootReason();
if (boot_reason == 1 || boot_reason == 4) {
const auto boot_reason = GetBootReason();
if (boot_reason == spl::BootReason_AcOk || boot_reason == spl::BootReason_RtcAlarm2) {
return;
}
@ -38,7 +38,7 @@ namespace ams::boot {
{
/* Splash screen is shown for 2 seconds. */
ShowDisplay(SplashScreenX, SplashScreenY, SplashScreenW, SplashScreenH, SplashScreen);
svcSleepThread(2'000'000'000ul);
os::SleepThread(TimeSpan::FromSeconds(2));
}
FinalizeDisplay();
}