akmenu-next/arm9/source/launcher/HomebrewLauncher.cpp
lifehackerhansol e702d1bfbf
Add the ILauncher interface, starting with homebrew
- To keep things simple, use devkitPro's nds-bootloader
2024-10-13 02:22:38 -07:00

24 lines
594 B
C++

/*
Copyright (C) 2024 lifehackerhansol
SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <nds/ndstypes.h>
#include <string>
#include <vector>
#include "HomebrewLauncher.h"
#include "ILauncher.h"
#include "nds_loader_arm9.h"
bool HomebrewLauncher::launchRom(std::string romPath, std::string savePath, u32 flags,
u32 cheatOffset, u32 cheatSize) {
std::vector<const char*> argv;
argv.push_back(romPath.c_str());
eRunNdsRetCode rc = runNdsFile(argv[0], argv.size(), &argv[0]);
if (rc == RUN_NDS_OK) return true;
return false;
}