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 7ef8cd961f
commit 832d0a7c05
2 changed files with 3 additions and 1 deletions

View File

@ -28,6 +28,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
- Scripting: Return proper callback ID from socket.add - Scripting: Return proper callback ID from socket.add

View File

@ -1566,7 +1566,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();