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
2 files changed,
12 insertions(+),
2 deletions(-)
M
src/platform/qt/GameController.cpp
→
src/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.cpp
→
src/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());