Qt: Fix stride changing when toggling SGB borders (fixes #1898)

This commit is contained in:
Vicki Pfau 2020-10-11 22:44:26 -07:00
parent ba566f334d
commit 7a9e1e4600
2 changed files with 13 additions and 0 deletions

View File

@ -73,6 +73,7 @@ Other fixes:
- Qt: Fix camera image being upside-down sometimes (fixes mgba.io/i/829 again)
- Qt: Fix drawing on macOS break when using OpenGL (fixes mgba.io/i/1899)
- Qt: Load/save bytes from memory viewer in the order visible (fixes mgba.io/i/1900)
- Qt: Fix stride changing when toggling SGB borders (fixes mgba.io/i/1898)
- mGUI: Fix closing down a game if an exit is signalled
- mVL: Fix injecting accidentally draining non-injection buffer
- SM83: Simplify register pair access on big endian

View File

@ -263,11 +263,23 @@ 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");
QSize sizeBefore = screenDimensions();
mCoreLoadForeignConfig(m_threadContext.core, config->config());
QSize sizeAfter = screenDimensions();
if (hasStarted()) {
updateFastForward();
mCoreThreadRewindParamsChanged(&m_threadContext);
}
if (sizeBefore != sizeAfter) {
m_threadContext.core->setVideoBuffer(m_threadContext.core, reinterpret_cast<color_t*>(m_activeBuffer.data()), sizeAfter.width());
#ifdef M_CORE_GB
mCoreConfigSetIntValue(&m_threadContext.core->config, "sgb.borders", 0);
m_threadContext.core->reloadConfigOption(m_threadContext.core, "sgb.borders", nullptr);
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "sgb.borders");
m_threadContext.core->reloadConfigOption(m_threadContext.core, "sgb.borders", nullptr);
#endif
}
}
#ifdef USE_DEBUGGERS