dimok789 / homebrew_launcher

WiiU Homebrew Launcher
GNU General Public License v3.0
401 stars 94 forks source link

HBL does not re-open after exiting an RPX program #24

Closed CreeperMario closed 7 years ago

CreeperMario commented 7 years ago

At the end of an HBL ELF program, we can simply call return 0; or return EXIT_SUCCESS; to return to HBL. However, calling return 0; at the end of an RPX program freezes the console.

I was able to work around this by calling SYSRelaunchTitle before returning. This triggers Mii Maker/HBL to reload, bringing be back to the homebrew menu.

The issue with this is it is not compatible with ProcUI (HOME Menu, because SYSRelaunchTitle and _SYSLaunchMiiStudio both require access to the bucket memory, which we cannot access while the program is behind the HOME Menu or exiting)

I was wondering if there was a cleaner method of exiting an RPX program running under HBL, while retaining functionality to return to HBL after the RPX file has exited.

CreeperMario commented 7 years ago

The solution to this is to call SYSRelaunchTitle(0, NULL); at the end of the RPX program. This will return to HBL without issue.