all repos — mgba @ e7f76e635b9e8f4873ddf16bfa9075d1e4c35355

mGBA Game Boy Advance Emulator

Qt: Fix stride changing when toggling SGB borders (fixes #1898)
Vicki Pfau vi@endrift.com
Sun, 11 Oct 2020 22:44:26 -0700
commit

e7f76e635b9e8f4873ddf16bfa9075d1e4c35355

parent

f13e06f38cd4005ab76002b45f7b47308d75ca47

2 files changed, 13 insertions(+), 0 deletions(-)

jump to
M CHANGESCHANGES

@@ -25,6 +25,7 @@ - Qt: Add dummy English translation file (fixes mgba.io/i/1469)

- Qt: Fix Battle Chip view not displaying chips on some DPI settings - 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: 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 - VFS: Fix directory node listing on some filesystems
M src/platform/qt/CoreController.cppsrc/platform/qt/CoreController.cpp

@@ -265,10 +265,22 @@ m_fastForwardVolume = config->getOption("fastForwardVolume", -1).toInt();

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 } }