Display user selection if no default user is set.

This commit is contained in:
Maschell 2020-11-26 21:14:37 +01:00
parent 4f208ba8a6
commit 6529ea36f4
2 changed files with 20 additions and 1 deletions

View File

@ -229,6 +229,10 @@ IMPORT(ACConnect);
IMPORT(ACClose);
IMPORT(ACGetAssignedAddress);
IMPORT(ACGetAssignedSubnet);
IMPORT(Initialize__Q2_2nn3actFv);
IMPORT(GetSlotNo__Q2_2nn3actFv);
IMPORT(GetDefaultAccount__Q2_2nn3actFv);
IMPORT(Finalize__Q2_2nn3actFv);
IMPORT_END();
/* proc_ui */
@ -266,6 +270,7 @@ IMPORT_BEGIN(sysapp);
IMPORT(SYSRelaunchTitle);
IMPORT(_SYSGetSystemApplicationTitleId);
IMPORT(SYSLaunchMenu);
IMPORT(_SYSLaunchMenuWithCheckingAccount);
IMPORT_END();

View File

@ -24,6 +24,7 @@
#include <proc_ui/procui.h>
#include <coreinit/foreground.h>
#include <coreinit/screen.h>
#include <nn/act/client_cpp.h>
#include "ElfUtils.h"
#include "module/ModuleData.h"
@ -64,6 +65,8 @@ bool CheckRunning() {
extern "C" void __init_wut();
extern "C" void __fini_wut();
extern "C" void _SYSLaunchMenuWithCheckingAccount(nn::act::SlotNo slot);
extern "C" int _start(int argc, char **argv) {
doKernelSetup();
InitFunctionPointers();
@ -121,7 +124,18 @@ extern "C" int _start(int argc, char **argv) {
}
if (doProcUI) {
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);
}
ProcUIInit(OSSavesDone_ReadyToRelease);
DEBUG_FUNCTION_LINE("In ProcUI loop");
while (CheckRunning()) {