boot: Implement DetectBootReason

This commit is contained in:
Michael Scire 2019-05-02 19:33:12 -07:00
parent fe0d41623c
commit 93fb060fac
9 changed files with 317 additions and 2 deletions

View file

@ -23,3 +23,11 @@ HardwareType Boot::GetHardwareType() {
}
return static_cast<HardwareType>(out_val);
}
bool Boot::IsRecoveryBoot() {
u64 val = 0;
if (R_FAILED(splGetConfig(SplConfigItem_IsRecoveryBoot, &val))) {
std::abort();
}
return val != 0;
}