From f38d44243ebfbbc5e2f7dbaa3a4851b40449c2f6 Mon Sep 17 00:00:00 2001 From: Maschell Date: Tue, 1 Dec 2020 13:07:09 +0100 Subject: [PATCH] Display user selection if no default user is set. --- source/main.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/source/main.cpp b/source/main.cpp index 627fc09..5c5fd26 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -39,6 +39,7 @@ bool CheckRunning() { extern "C" uint32_t textStart(); +extern "C" void _SYSLaunchMenuWithCheckingAccount(nn::act::SlotNo slot); bool doRelocation(std::vector &relocData, relocation_trampolin_entry_t *tramp_data, uint32_t tramp_length) { for (auto const &curReloc : relocData) { std::string functionName = curReloc.getName(); @@ -126,7 +127,17 @@ int main(int argc, char **argv) { WHBLogUdpDeinit(); ProcUIInit(OSSavesDone_ReadyToRelease); - SYSLaunchMenu(); + + nn::act::Initialize(); + nn::act::SlotNo slot = nn::act::GetSlotNo(); + nn::act::SlotNo defaultSlot = nn::act::GetDefaultAccount(); + nn::act::Finalize(); + + if (defaultSlot) { //normal menu boot + SYSLaunchMenu(); + } else { //show mii select + _SYSLaunchMenuWithCheckingAccount(slot); + } while (CheckRunning()) { // wait. OSSleepTicks(OSMillisecondsToTicks(100));