mirror of
https://github.com/coderkei/akmenu-next.git
synced 2025-06-19 01:15:32 -04:00
Add back support for PassMe
This is handled by PassMeLoader; it must be present in `/__rpg/`.
This commit is contained in:
parent
8a5ec3e0b8
commit
12737bfbe2
25
arm9/source/launcher/PassMeLauncher.cpp
Normal file
25
arm9/source/launcher/PassMeLauncher.cpp
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
Copyright (C) 2024 lifehackerhansol
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#include <nds/ndstypes.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "ILauncher.h"
|
||||
#include "PassMeLauncher.h"
|
||||
#include "nds_loader_arm9.h"
|
||||
|
||||
bool PassMeLauncher::launchRom(std::string romPath, std::string savePath, u32 flags,
|
||||
u32 cheatOffset, u32 cheatSize) {
|
||||
const char passMeLoaderPath[] = "fat:/__rpg/PassMeLoader.nds";
|
||||
|
||||
std::vector<const char*> argv;
|
||||
argv.push_back(passMeLoaderPath);
|
||||
eRunNdsRetCode rc = runNdsFile(argv[0], argv.size(), &argv[0]);
|
||||
if (rc == RUN_NDS_OK) return true;
|
||||
|
||||
return false;
|
||||
}
|
17
arm9/source/launcher/PassMeLauncher.h
Normal file
17
arm9/source/launcher/PassMeLauncher.h
Normal file
@ -0,0 +1,17 @@
|
||||
/*
|
||||
Copyright (C) 2024 lifehackerhansol
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "ILauncher.h"
|
||||
|
||||
class PassMeLauncher : public ILauncher {
|
||||
public:
|
||||
bool launchRom(std::string romPath, std::string savePath, u32 flags, u32 cheatOffset,
|
||||
u32 cheatSize) override;
|
||||
};
|
@ -34,6 +34,7 @@
|
||||
|
||||
#include "launcher/HomebrewLauncher.h"
|
||||
#include "launcher/NdsBootstrapLauncher.h"
|
||||
#include "launcher/PassMeLauncher.h"
|
||||
|
||||
using namespace akui;
|
||||
|
||||
@ -669,7 +670,7 @@ void cMainWnd::onFolderChanged() {
|
||||
}
|
||||
}
|
||||
if (mode == cGlobalSettings::ESlot2Nds) {
|
||||
// loadRom("slot2:/", "", 0, 0, 0);
|
||||
PassMeLauncher().launchRom("slot2:/", "", 0, 0, 0);
|
||||
} else {
|
||||
CGbaLoader::StartGBA();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user