mirror of
https://github.com/LNH-team/pico-loader.git
synced 2026-06-02 09:16:49 +02:00
Only setup homebrew bootstub when launcherPath is set
This commit is contained in:
@@ -10,9 +10,5 @@ extern u8 __bss_size[];
|
||||
pload_header7_t gLoaderHeader
|
||||
{
|
||||
.entryPoint = (void*)&_start,
|
||||
.apiVersion = PICO_LOADER_API_VERSION,
|
||||
.v2 =
|
||||
{
|
||||
.launcherPath = "/_picoboot.nds"
|
||||
}
|
||||
.apiVersion = PICO_LOADER_API_VERSION
|
||||
};
|
||||
@@ -436,17 +436,21 @@ void NdsLoader::InsertArgv()
|
||||
|
||||
void NdsLoader::HandleHomebrewPatching()
|
||||
{
|
||||
sendToArm9(IPC_COMMAND_ARM9_APPLY_HOMEBREW_PATCHES);
|
||||
sendToArm9(16 * 1024); // required dldi space
|
||||
void* dldiSpace = (void*)receiveFromArm9();
|
||||
char* launcherPath = (char*)receiveFromArm9();
|
||||
if (dldiSpace != nullptr)
|
||||
if (_launcherPath != nullptr && _launcherPath[0] != 0)
|
||||
{
|
||||
dldi_copyTo(dldiSpace);
|
||||
}
|
||||
if (launcherPath != nullptr)
|
||||
{
|
||||
strncpy(launcherPath, _launcherPath, 256);
|
||||
sendToArm9(IPC_COMMAND_ARM9_SETUP_HOMEBREW_BOOTSTUB);
|
||||
sendToArm9(16 * 1024); // required dldi space
|
||||
void* dldiSpace = (void*)receiveFromArm9();
|
||||
char* launcherPath = (char*)receiveFromArm9();
|
||||
if (dldiSpace != nullptr)
|
||||
{
|
||||
dldi_copyTo(dldiSpace);
|
||||
}
|
||||
if (launcherPath != nullptr)
|
||||
{
|
||||
strncpy(launcherPath, _launcherPath, 256);
|
||||
launcherPath[255] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user