Qt: Fix checked state of mute menu option at load (fixes #2701)

This commit is contained in:
Vicki Pfau 2023-03-27 01:09:51 -07:00
parent 7d9d71ef54
commit 121376ccb0
2 changed files with 3 additions and 1 deletions

View File

@ -20,6 +20,7 @@ Other fixes:
- Qt: Fix crash if loading a shader fails - Qt: Fix crash if loading a shader fails
- Qt: Fix black screen when starting with a game (fixes mgba.io/i/2781) - Qt: Fix black screen when starting with a game (fixes mgba.io/i/2781)
- Qt: Fix OSD on modern macOS (fixes mgba.io/i/2736) - Qt: Fix OSD on modern macOS (fixes mgba.io/i/2736)
- Qt: Fix checked state of mute menu option at load (fixes mgba.io/i/2701)
- Scripting: Fix receiving packets for client sockets - Scripting: Fix receiving packets for client sockets
- Scripting: Fix empty receive calls returning unknown error on Windows - Scripting: Fix empty receive calls returning unknown error on Windows
Misc: Misc:

View File

@ -1597,7 +1597,8 @@ void Window::setupMenu(QMenuBar* menubar) {
m_actions.addSeparator("av"); m_actions.addSeparator("av");
ConfigOption* mute = m_config->addOption("mute"); ConfigOption* mute = m_config->addOption("mute");
mute->addBoolean(tr("Mute"), &m_actions, "av"); Action* muteAction = mute->addBoolean(tr("Mute"), &m_actions, "av");
muteAction->setActive(m_config->getOption("mute").toInt());
mute->connect([this](const QVariant& value) { mute->connect([this](const QVariant& value) {
m_config->setOption("fastForwardMute", static_cast<bool>(value.toInt())); m_config->setOption("fastForwardMute", static_cast<bool>(value.toInt()));
reloadConfig(); reloadConfig();