mirror of https://github.com/mgba-emu/mgba.git
Load patch from command line
This commit is contained in:
parent
bfa5fb6173
commit
6041bf422a
|
@ -147,6 +147,10 @@ void GameController::loadGame(const QString& path, bool dirmode) {
|
||||||
m_threadContext.bios = VFileOpen(m_bios.toLocal8Bit().constData(), O_RDONLY);
|
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);
|
GBAThreadStart(&m_threadContext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -154,6 +158,10 @@ void GameController::loadBIOS(const QString& path) {
|
||||||
m_bios = path;
|
m_bios = path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GameController::loadPatch(const QString& path) {
|
||||||
|
m_patch = path;
|
||||||
|
}
|
||||||
|
|
||||||
void GameController::closeGame() {
|
void GameController::closeGame() {
|
||||||
if (!m_gameOpen) {
|
if (!m_gameOpen) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -57,6 +57,7 @@ signals:
|
||||||
public slots:
|
public slots:
|
||||||
void loadGame(const QString& path, bool dirmode = false);
|
void loadGame(const QString& path, bool dirmode = false);
|
||||||
void loadBIOS(const QString& path);
|
void loadBIOS(const QString& path);
|
||||||
|
void loadPatch(const QString& path);
|
||||||
void closeGame();
|
void closeGame();
|
||||||
void setPaused(bool paused);
|
void setPaused(bool paused);
|
||||||
void reset();
|
void reset();
|
||||||
|
@ -90,6 +91,7 @@ private:
|
||||||
|
|
||||||
bool m_gameOpen;
|
bool m_gameOpen;
|
||||||
QString m_bios;
|
QString m_bios;
|
||||||
|
QString m_patch;
|
||||||
|
|
||||||
QThread* m_audioThread;
|
QThread* m_audioThread;
|
||||||
AudioProcessor* m_audioProcessor;
|
AudioProcessor* m_audioProcessor;
|
||||||
|
|
|
@ -112,17 +112,16 @@ void Window::optionsPassed(StartupOptions* opts) {
|
||||||
m_controller->loadBIOS(opts->bios);
|
m_controller->loadBIOS(opts->bios);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (opts->patch) {
|
||||||
|
m_controller->loadPatch(opts->patch);
|
||||||
|
}
|
||||||
|
|
||||||
if (opts->fname) {
|
if (opts->fname) {
|
||||||
m_controller->loadGame(opts->fname, opts->dirmode);
|
m_controller->loadGame(opts->fname, opts->dirmode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// - patch
|
// - frameskip
|
||||||
// - frameskip;
|
|
||||||
// - rewindBufferCapacity
|
|
||||||
// - rewindBufferInterval
|
|
||||||
// - DebuggerType debuggerType
|
|
||||||
// - debugAtStart
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window::selectROM() {
|
void Window::selectROM() {
|
||||||
|
|
Loading…
Reference in New Issue