From 121376ccb0bb58f0634afec434ce045413bb6e1d Mon Sep 17 00:00:00 2001 From: Vicki Pfau Date: Mon, 27 Mar 2023 01:09:51 -0700 Subject: [PATCH] Qt: Fix checked state of mute menu option at load (fixes #2701) --- CHANGES | 1 + src/platform/qt/Window.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 9fa382381..783e86dd6 100644 --- a/CHANGES +++ b/CHANGES @@ -20,6 +20,7 @@ Other fixes: - Qt: Fix crash if loading a shader fails - 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 checked state of mute menu option at load (fixes mgba.io/i/2701) - Scripting: Fix receiving packets for client sockets - Scripting: Fix empty receive calls returning unknown error on Windows Misc: diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index a644f794a..0aee02e9d 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1597,7 +1597,8 @@ void Window::setupMenu(QMenuBar* menubar) { m_actions.addSeparator("av"); 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) { m_config->setOption("fastForwardMute", static_cast(value.toInt())); reloadConfig();