From e267794110d534187c1407857f12138098e5e737 Mon Sep 17 00:00:00 2001 From: Maschell Date: Thu, 26 Nov 2020 21:40:24 +0100 Subject: [PATCH] Display user selection if no default user is set and we load without hacks --- source/main.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/source/main.cpp b/source/main.cpp index 98a764c..e78cede 100644 --- a/source/main.cpp +++ b/source/main.cpp @@ -4,6 +4,8 @@ #include +#include + #include #include #include @@ -43,6 +45,8 @@ bool CheckRunning() { return true; } +extern "C" void _SYSLaunchMenuWithCheckingAccount(nn::act::SlotNo slot); + int main(int argc, char **argv) { WHBLogUdpInit(); @@ -108,7 +112,19 @@ int main(int argc, char **argv) { DEBUG_FUNCTION_LINE("Forcing start of title: %016llX", sysmenuIdUll); ExecuteIOSExploit(); - 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()) {