close on root+B or PLUS

This commit is contained in:
HookedBehemoth 2020-07-06 01:44:13 +02:00 committed by Luis Scheurenbrand
parent 20c1f00972
commit c0c21ee668
3 changed files with 9 additions and 5 deletions

View File

@ -81,7 +81,7 @@ void launchMenuNetloaderTask() {
workerSchedule(netloaderTask, NULL); workerSchedule(netloaderTask, NULL);
} }
void launchMenuBackTask() { int launchMenuBackTask() {
if(hbmenu_state == HBMENU_NETLOADER_ACTIVE) { if(hbmenu_state == HBMENU_NETLOADER_ACTIVE) {
netloaderSignalExit(); netloaderSignalExit();
} }
@ -90,9 +90,9 @@ void launchMenuBackTask() {
menuScan(rootPath); menuScan(rootPath);
} }
else { else {
menuScan(".."); return menuScan("..");
} }
return false;
} }
void menuHandleAButton(void) { void menuHandleAButton(void) {

View File

@ -109,7 +109,7 @@ int menuFileassocScan(const char* target);
void launchMenuEntryTask(menuEntry_s* arg); void launchMenuEntryTask(menuEntry_s* arg);
void toggleStarState(menuEntry_s* arg); void toggleStarState(menuEntry_s* arg);
void launchApplyThemeTask(menuEntry_s* arg); void launchApplyThemeTask(menuEntry_s* arg);
void launchMenuBackTask(); int launchMenuBackTask();
void launchMenuNetloaderTask(); void launchMenuNetloaderTask();
char *menuGetRootPath(void); char *menuGetRootPath(void);
char *menuGetRootBasePath(void); char *menuGetRootBasePath(void);

View File

@ -225,13 +225,17 @@ bool menuUpdate(void) {
} }
else if (down & HidNpadButton_B) else if (down & HidNpadButton_B)
{ {
launchMenuBackTask(); if (launchMenuBackTask()) {
__nx_applet_exit_mode = 1;
exitflag = 1;
}
} }
else if(down & HidNpadButton_Minus){ else if(down & HidNpadButton_Minus){
themeMenuStartup(); themeMenuStartup();
} }
else if (down & HidNpadButton_Plus) else if (down & HidNpadButton_Plus)
{ {
__nx_applet_exit_mode = 1;
exitflag = 1; exitflag = 1;
} }
else if (menu->nEntries > 0) else if (menu->nEntries > 0)