Skip to content

Commit 1e27669

Browse files
args: handle the DSi mode use case
This doesn't handle the DSi mode with flashcart scenario, however...
1 parent a625d90 commit 1e27669

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

source/args.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include <utility>
3131
#include <vector>
3232

33+
#include <nds.h>
34+
3335
#include "args.h"
3436

3537
using namespace std;
@@ -244,7 +246,10 @@ bool argsFillArray(const string& filePath, vector<string>& argarray) {
244246
if(!toAbsPath(filePath, NULL, absPath)) {
245247
return false;
246248
}
247-
argarray.push_back(GBARUNNER3_PATH);
249+
if(isDSiMode())
250+
argarray.push_back(GBARUNNER3_PATH_SD);
251+
else
252+
argarray.push_back(GBARUNNER3_PATH);
248253
argarray.push_back(move(absPath));
249254
} else {
250255
// This is a data file associated with a handler NDS by an ext file

source/args.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@
3737
#define GBARUNNER3_PATH "/GBARunner3.nds"
3838
#endif
3939

40+
#define GBARUNNER3_PATH_SD "sd:" GBARUNNER3_PATH
41+
4042
/* Convert a file path of any type (e.g. .nds or .argv) into a path to the NDS
4143
* file to be opened. The returned path may be absolute or relative to the
4244
* current working directory.

0 commit comments

Comments
 (0)