akmenu-next/arm9/source/launcher/Slot1Launcher.cpp
Kei 81f03768e0 Custom Hotkey & Slot 1 Launcher
- Custom Hotkey via ndsbs.ini
- Slot 1 launcher Added
- Dotfiles from MacOS are now hidden
2025-05-30 21:39:00 +01:00

35 lines
909 B
C++

/*
Copyright (C) 2024 lifehackerhansol
SPDX-License-Identifier: GPL-3.0-or-later
*/
#include <nds/ndstypes.h>
#include <string>
#include <vector>
#include "ILauncher.h"
#include "Slot1Launcher.h"
#include "nds_loader_arm9.h"
bool Slot1Launcher::launchRom(std::string romPath, std::string savePath, u32 flags,
u32 cheatOffset, u32 cheatSize) {
#ifdef __DSIMODE__
const char slot1LoaderPath[] = "sd:/_nds/akmenunext/slot1launch.nds";
#else
const char slot1LoaderPath[] = "fat:/_nds/akmenunext/slot1launch.nds";
#endif
if (access(slot1LoaderPath, F_OK) != 0) {
printLoaderNotFound(slot1LoaderPath);
return false;
}
std::vector<const char*> argv;
argv.push_back(slot1LoaderPath);
eRunNdsRetCode rc = runNdsFile(argv[0], argv.size(), &argv[0]);
if (rc == RUN_NDS_OK) return true;
return false;
}