mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix preloading for ROM replacing
This commit is contained in:
parent
a9978e9892
commit
6fd3bfb86b
1
CHANGES
1
CHANGES
|
@ -49,6 +49,7 @@ Other fixes:
|
||||||
- mGUI: Fix FPS counter after closing menu
|
- mGUI: Fix FPS counter after closing menu
|
||||||
- Qt: Fix some hangs when using the debugger console
|
- Qt: Fix some hangs when using the debugger console
|
||||||
- Qt: Fix crash when clicking past last tile in viewer
|
- Qt: Fix crash when clicking past last tile in viewer
|
||||||
|
- Qt: Fix preloading for ROM replacing
|
||||||
- VFS: Failed file mapping should return NULL on POSIX
|
- VFS: Failed file mapping should return NULL on POSIX
|
||||||
Misc:
|
Misc:
|
||||||
- Core: Suspend runloop when a core crashes
|
- Core: Suspend runloop when a core crashes
|
||||||
|
|
|
@ -287,6 +287,7 @@ void CoreController::loadConfig(ConfigController* config) {
|
||||||
m_fastForwardMute = config->getOption("fastForwardMute", -1).toInt();
|
m_fastForwardMute = config->getOption("fastForwardMute", -1).toInt();
|
||||||
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "volume");
|
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "volume");
|
||||||
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "mute");
|
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "mute");
|
||||||
|
m_preload = config->getOption("preload").toInt();
|
||||||
|
|
||||||
int playerId = m_multiplayer->playerId(this) + 1;
|
int playerId = m_multiplayer->playerId(this) + 1;
|
||||||
QVariant savePlayerId = config->getOption("savePlayerId");
|
QVariant savePlayerId = config->getOption("savePlayerId");
|
||||||
|
@ -829,7 +830,11 @@ void CoreController::replaceGame(const QString& path) {
|
||||||
QString fname = info.canonicalFilePath();
|
QString fname = info.canonicalFilePath();
|
||||||
Interrupter interrupter(this);
|
Interrupter interrupter(this);
|
||||||
mDirectorySetDetachBase(&m_threadContext.core->dirs);
|
mDirectorySetDetachBase(&m_threadContext.core->dirs);
|
||||||
mCoreLoadFile(m_threadContext.core, fname.toUtf8().constData());
|
if (m_preload) {
|
||||||
|
mCorePreloadFile(m_threadContext.core, fname.toUtf8().constData());
|
||||||
|
} else {
|
||||||
|
mCoreLoadFile(m_threadContext.core, fname.toUtf8().constData());
|
||||||
|
}
|
||||||
updateROMInfo();
|
updateROMInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -240,6 +240,7 @@ private:
|
||||||
mCoreThread m_threadContext{};
|
mCoreThread m_threadContext{};
|
||||||
|
|
||||||
bool m_patched = false;
|
bool m_patched = false;
|
||||||
|
bool m_preload = false;
|
||||||
|
|
||||||
uint32_t m_crc32;
|
uint32_t m_crc32;
|
||||||
QString m_internalTitle;
|
QString m_internalTitle;
|
||||||
|
|
Loading…
Reference in New Issue