mirror of https://github.com/mgba-emu/mgba.git
Platform: Dirmode is dead
This commit is contained in:
parent
e5f2dcb5ab
commit
bee854bb61
|
@ -36,7 +36,6 @@
|
|||
static const struct option _options[] = {
|
||||
{ "bios", required_argument, 0, 'b' },
|
||||
{ "cheats", required_argument, 0, 'c' },
|
||||
{ "dirmode", required_argument, 0, 'D' },
|
||||
{ "frameskip", required_argument, 0, 's' },
|
||||
#ifdef USE_CLI_DEBUGGER
|
||||
{ "debug", no_argument, 0, 'd' },
|
||||
|
@ -56,7 +55,7 @@ static bool _parseGraphicsArg(struct SubParser* parser, struct GBAConfig* config
|
|||
bool parseArguments(struct GBAArguments* opts, struct GBAConfig* config, int argc, char* const* argv, struct SubParser* subparser) {
|
||||
int ch;
|
||||
char options[64] =
|
||||
"b:c:Dhl:p:s:v:"
|
||||
"b:c:hl:p:s:v:"
|
||||
#ifdef USE_CLI_DEBUGGER
|
||||
"d"
|
||||
#endif
|
||||
|
@ -86,9 +85,6 @@ bool parseArguments(struct GBAArguments* opts, struct GBAConfig* config, int arg
|
|||
case 'c':
|
||||
opts->cheatsFile = strdup(optarg);
|
||||
break;
|
||||
case 'D':
|
||||
opts->dirmode = true;
|
||||
break;
|
||||
#ifdef USE_CLI_DEBUGGER
|
||||
case 'd':
|
||||
if (opts->debuggerType != DEBUGGER_NONE) {
|
||||
|
|
|
@ -25,7 +25,6 @@ struct GBAArguments {
|
|||
char* fname;
|
||||
char* patch;
|
||||
char* cheatsFile;
|
||||
bool dirmode;
|
||||
char* movie;
|
||||
|
||||
enum DebuggerType debuggerType;
|
||||
|
|
|
@ -281,26 +281,22 @@ void GameController::setDebugger(ARMDebugger* debugger) {
|
|||
}
|
||||
#endif
|
||||
|
||||
void GameController::loadGame(const QString& path, bool dirmode) {
|
||||
void GameController::loadGame(const QString& path) {
|
||||
closeGame();
|
||||
if (!dirmode) {
|
||||
QFile file(path);
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
postLog(GBA_LOG_ERROR, tr("Failed to open game file: %1").arg(path));
|
||||
return;
|
||||
}
|
||||
file.close();
|
||||
}
|
||||
|
||||
m_fname = path;
|
||||
m_dirmode = dirmode;
|
||||
openGame();
|
||||
}
|
||||
|
||||
void GameController::bootBIOS() {
|
||||
closeGame();
|
||||
m_fname = QString();
|
||||
m_dirmode = false;
|
||||
openGame(true);
|
||||
}
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ signals:
|
|||
void postLog(int level, const QString& log);
|
||||
|
||||
public slots:
|
||||
void loadGame(const QString& path, bool dirmode = false);
|
||||
void loadGame(const QString& path);
|
||||
void loadBIOS(const QString& path);
|
||||
void yankPak();
|
||||
void replaceGame(const QString& path);
|
||||
|
@ -180,7 +180,6 @@ private:
|
|||
int m_logLevels;
|
||||
|
||||
bool m_gameOpen;
|
||||
bool m_dirmode;
|
||||
|
||||
QString m_fname;
|
||||
QString m_bios;
|
||||
|
|
|
@ -180,7 +180,7 @@ void Window::argumentsPassed(GBAArguments* args) {
|
|||
}
|
||||
|
||||
if (args->fname) {
|
||||
m_controller->loadGame(args->fname, args->dirmode);
|
||||
m_controller->loadGame(args->fname);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue