Load BIOS from command line
Jeffrey Pfau jeffrey@endrift.com
Sat, 18 Oct 2014 17:15:39 -0700
3 files changed,
18 insertions(+),
6 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/platform/qt/GameController.cpp
@@ -139,7 +139,15 @@ m_threadContext.gameDir = VDirOpenZip(m_threadContext.fname, 0);
#endif } + if (!m_bios.isNull()) { + m_threadContext.bios = VFileOpen(m_bios.toLocal8Bit().constData(), O_RDONLY); + } + GBAThreadStart(&m_threadContext); +} + +void GameController::loadBIOS(const QString& path) { + m_bios = path; } void GameController::closeGame() {
M
src/platform/qt/GameController.h
→
src/platform/qt/GameController.h
@@ -53,6 +53,7 @@ void postLog(int level, const QString& log);
public slots: void loadGame(const QString& path, bool dirmode = false); + void loadBIOS(const QString& path); void closeGame(); void setPaused(bool paused); void reset();@@ -82,7 +83,7 @@ GBAVideoSoftwareRenderer* m_renderer;
int m_activeKeys; bool m_gameOpen; - QFile* m_bios; + QString m_bios; QThread* m_audioThread; AudioProcessor* m_audioProcessor;
M
src/platform/qt/Window.cpp
→
src/platform/qt/Window.cpp
@@ -104,16 +104,19 @@ }
} void Window::optionsPassed(StartupOptions* opts) { + if (opts->logLevel) { + m_logView->setLevels(opts->logLevel); + } + + if (opts->bios) { + m_controller->loadBIOS(opts->bios); + } + if (opts->fname) { m_controller->loadGame(opts->fname, opts->dirmode); } - if (opts->logLevel) { - m_logView->setLevels(opts->logLevel); - } - // TODO: - // - bios // - patch // - frameskip; // - rewindBufferCapacity