Load patch from command line
Jeffrey Pfau jeffrey@endrift.com
Fri, 24 Oct 2014 01:25:06 -0700
3 files changed,
15 insertions(+),
6 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -147,11 +147,19 @@ if (!m_bios.isNull()) {
m_threadContext.bios = VFileOpen(m_bios.toLocal8Bit().constData(), O_RDONLY); } + if (!m_patch.isNull()) { + m_threadContext.patch = VFileOpen(m_patch.toLocal8Bit().constData(), O_RDONLY); + } + GBAThreadStart(&m_threadContext); } void GameController::loadBIOS(const QString& path) { m_bios = path; +} + +void GameController::loadPatch(const QString& path) { + m_patch = path; } void GameController::closeGame() {
M
src/platform/qt/GameController.h
→
src/platform/qt/GameController.h
@@ -57,6 +57,7 @@
public slots: void loadGame(const QString& path, bool dirmode = false); void loadBIOS(const QString& path); + void loadPatch(const QString& path); void closeGame(); void setPaused(bool paused); void reset();@@ -90,6 +91,7 @@ int m_activeKeys;
bool m_gameOpen; QString m_bios; + QString m_patch; QThread* m_audioThread; AudioProcessor* m_audioProcessor;
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -112,17 +112,16 @@ if (opts->bios) {
m_controller->loadBIOS(opts->bios); } + if (opts->patch) { + m_controller->loadPatch(opts->patch); + } + if (opts->fname) { m_controller->loadGame(opts->fname, opts->dirmode); } // TODO: - // - patch - // - frameskip; - // - rewindBufferCapacity - // - rewindBufferInterval - // - DebuggerType debuggerType - // - debugAtStart + // - frameskip } void Window::selectROM() {