Platform: Dirmode is dead
Jeffrey Pfau jeffrey@endrift.com
Sun, 24 Jan 2016 01:04:09 -0800
5 files changed,
9 insertions(+),
19 deletions(-)
M
src/platform/commandline.c
→
src/platform/commandline.c
@@ -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 @@
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@@ -85,9 +84,6 @@ GBAConfigSetOverrideValue(config, "bios", optarg);
break; case 'c': opts->cheatsFile = strdup(optarg); - break; - case 'D': - opts->dirmode = true; break; #ifdef USE_CLI_DEBUGGER case 'd':
M
src/platform/commandline.h
→
src/platform/commandline.h
@@ -25,7 +25,6 @@ struct GBAArguments {
char* fname; char* patch; char* cheatsFile; - bool dirmode; char* movie; enum DebuggerType debuggerType;
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -281,26 +281,22 @@ threadContinue();
} #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(); + 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); }
M
src/platform/qt/GameController.h
→
src/platform/qt/GameController.h
@@ -97,7 +97,7 @@ void statusPosted(const QString& message);
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 @@ int m_inactiveKeys;
int m_logLevels; bool m_gameOpen; - bool m_dirmode; QString m_fname; QString m_bios;
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -180,7 +180,7 @@ m_controller->loadPatch(args->patch);
} if (args->fname) { - m_controller->loadGame(args->fname, args->dirmode); + m_controller->loadGame(args->fname); } }