mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix directory sets in BIOS-only boot
This commit is contained in:
parent
051198395d
commit
f73bc93080
|
@ -341,6 +341,10 @@ void GameController::openGame(bool biosOnly) {
|
||||||
|
|
||||||
if (!biosOnly) {
|
if (!biosOnly) {
|
||||||
mCoreLoadFile(m_threadContext.core, m_fname.toUtf8().constData());
|
mCoreLoadFile(m_threadContext.core, m_fname.toUtf8().constData());
|
||||||
|
} else {
|
||||||
|
char dirname[PATH_MAX];
|
||||||
|
separatePath(m_bios.toUtf8().constData(), dirname, m_threadContext.core->dirs.baseName, 0);
|
||||||
|
mDirectorySetAttachBase(&m_threadContext.core->dirs, VDirOpen(dirname));
|
||||||
}
|
}
|
||||||
|
|
||||||
m_threadContext.core->setVideoBuffer(m_threadContext.core, m_drawContext, width);
|
m_threadContext.core->setVideoBuffer(m_threadContext.core, m_drawContext, width);
|
||||||
|
@ -353,16 +357,6 @@ void GameController::openGame(bool biosOnly) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!m_patch.isNull()) {
|
|
||||||
VFile* patch = VFileDevice::open(m_patch, O_RDONLY);
|
|
||||||
if (patch) {
|
|
||||||
m_threadContext.core->loadPatch(m_threadContext.core, patch);
|
|
||||||
}
|
|
||||||
patch->close(patch);
|
|
||||||
} else {
|
|
||||||
mCoreAutoloadPatch(m_threadContext.core);
|
|
||||||
}
|
|
||||||
|
|
||||||
m_inputController->recalibrateAxes();
|
m_inputController->recalibrateAxes();
|
||||||
memset(m_drawContext, 0xF8, width * height * 4);
|
memset(m_drawContext, 0xF8, width * height * 4);
|
||||||
|
|
||||||
|
@ -374,6 +368,15 @@ void GameController::openGame(bool biosOnly) {
|
||||||
|
|
||||||
if (!biosOnly) {
|
if (!biosOnly) {
|
||||||
mCoreAutoloadSave(m_threadContext.core);
|
mCoreAutoloadSave(m_threadContext.core);
|
||||||
|
if (!m_patch.isNull()) {
|
||||||
|
VFile* patch = VFileDevice::open(m_patch, O_RDONLY);
|
||||||
|
if (patch) {
|
||||||
|
m_threadContext.core->loadPatch(m_threadContext.core, patch);
|
||||||
|
}
|
||||||
|
patch->close(patch);
|
||||||
|
} else {
|
||||||
|
mCoreAutoloadPatch(m_threadContext.core);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mCoreThreadStart(&m_threadContext)) {
|
if (!mCoreThreadStart(&m_threadContext)) {
|
||||||
|
|
Loading…
Reference in New Issue