diff --git a/CHANGES b/CHANGES index ff795586a..558807a83 100644 --- a/CHANGES +++ b/CHANGES @@ -49,6 +49,7 @@ Other fixes: - mGUI: Fix FPS counter after closing menu - Qt: Fix some hangs when using the debugger console - 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 Misc: - Core: Suspend runloop when a core crashes diff --git a/src/platform/qt/CoreController.cpp b/src/platform/qt/CoreController.cpp index 4491a0f33..ec0edea11 100644 --- a/src/platform/qt/CoreController.cpp +++ b/src/platform/qt/CoreController.cpp @@ -287,6 +287,7 @@ void CoreController::loadConfig(ConfigController* config) { m_fastForwardMute = config->getOption("fastForwardMute", -1).toInt(); mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "volume"); mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "mute"); + m_preload = config->getOption("preload").toInt(); int playerId = m_multiplayer->playerId(this) + 1; QVariant savePlayerId = config->getOption("savePlayerId"); @@ -829,7 +830,11 @@ void CoreController::replaceGame(const QString& path) { QString fname = info.canonicalFilePath(); Interrupter interrupter(this); 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(); } diff --git a/src/platform/qt/CoreController.h b/src/platform/qt/CoreController.h index 03c929c48..663d0ed96 100644 --- a/src/platform/qt/CoreController.h +++ b/src/platform/qt/CoreController.h @@ -240,6 +240,7 @@ private: mCoreThread m_threadContext{}; bool m_patched = false; + bool m_preload = false; uint32_t m_crc32; QString m_internalTitle;