all repos — mgba @ 0eb76806beb6af13d8aacf535795fc0f84b65233

mGBA Game Boy Advance Emulator

Qt: Fix changing whether a BIOS is used while the game is running
Jeffrey Pfau jeffrey@endrift.com
Thu, 13 Aug 2015 20:01:59 -0700
commit

0eb76806beb6af13d8aacf535795fc0f84b65233

parent

4fd479897c6972377ac625f43306aa794bc4d5c0

2 files changed, 12 insertions(+), 2 deletions(-)

jump to
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -670,9 +670,14 @@ threadContinue();

} void GameController::setUseBIOS(bool use) { - threadInterrupt(); + if (use == m_useBios) { + return; + } m_useBios = use; - threadContinue(); + if (m_gameOpen) { + closeGame(); + openGame(); + } } void GameController::loadState(int slot) {
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -1123,6 +1123,11 @@ skipBios->connect([this](const QVariant& value) {

m_controller->setSkipBIOS(value.toBool()); }, this); + ConfigOption* useBios = m_config->addOption("useBios"); + useBios->connect([this](const QVariant& value) { + m_controller->setUseBIOS(value.toBool()); + }, this); + ConfigOption* buffers = m_config->addOption("audioBuffers"); buffers->connect([this](const QVariant& value) { emit audioBufferSamplesChanged(value.toInt());