Display user selection if no default user is set.

This commit is contained in:
Maschell 2020-12-01 13:07:09 +01:00
parent 6a2a7ca1fd
commit f38d44243e

View File

@ -39,6 +39,7 @@ bool CheckRunning() {
extern "C" uint32_t textStart(); extern "C" uint32_t textStart();
extern "C" void _SYSLaunchMenuWithCheckingAccount(nn::act::SlotNo slot);
bool doRelocation(std::vector<RelocationData> &relocData, relocation_trampolin_entry_t *tramp_data, uint32_t tramp_length) { bool doRelocation(std::vector<RelocationData> &relocData, relocation_trampolin_entry_t *tramp_data, uint32_t tramp_length) {
for (auto const &curReloc : relocData) { for (auto const &curReloc : relocData) {
std::string functionName = curReloc.getName(); std::string functionName = curReloc.getName();
@ -126,7 +127,17 @@ int main(int argc, char **argv) {
WHBLogUdpDeinit(); WHBLogUdpDeinit();
ProcUIInit(OSSavesDone_ReadyToRelease); ProcUIInit(OSSavesDone_ReadyToRelease);
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(); SYSLaunchMenu();
} else { //show mii select
_SYSLaunchMenuWithCheckingAccount(slot);
}
while (CheckRunning()) { while (CheckRunning()) {
// wait. // wait.
OSSleepTicks(OSMillisecondsToTicks(100)); OSSleepTicks(OSMillisecondsToTicks(100));