mirror of https://github.com/mgba-emu/mgba.git
Qt: Fix changing whether a BIOS is used while the game is running
This commit is contained in:
parent
4fd479897c
commit
0eb76806be
|
@ -670,9 +670,14 @@ void GameController::setSkipBIOS(bool set) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::setUseBIOS(bool use) {
|
void GameController::setUseBIOS(bool use) {
|
||||||
threadInterrupt();
|
if (use == m_useBios) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
m_useBios = use;
|
m_useBios = use;
|
||||||
threadContinue();
|
if (m_gameOpen) {
|
||||||
|
closeGame();
|
||||||
|
openGame();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameController::loadState(int slot) {
|
void GameController::loadState(int slot) {
|
||||||
|
|
|
@ -1123,6 +1123,11 @@ void Window::setupMenu(QMenuBar* menubar) {
|
||||||
m_controller->setSkipBIOS(value.toBool());
|
m_controller->setSkipBIOS(value.toBool());
|
||||||
}, this);
|
}, 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");
|
ConfigOption* buffers = m_config->addOption("audioBuffers");
|
||||||
buffers->connect([this](const QVariant& value) {
|
buffers->connect([this](const QVariant& value) {
|
||||||
emit audioBufferSamplesChanged(value.toInt());
|
emit audioBufferSamplesChanged(value.toInt());
|
||||||
|
|
Loading…
Reference in New Issue