From 832d0a7c0525b1ef79fcfe1c449893d1f0c86fb3 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 1d3653e28..041f3f4ce 100644 --- a/CHANGES +++ b/CHANGES @@ -28,6 +28,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 - Scripting: Return proper callback ID from socket.add diff --git a/src/platform/qt/Window.cpp b/src/platform/qt/Window.cpp index 083732cd8..bb97bf5c3 100644 --- a/src/platform/qt/Window.cpp +++ b/src/platform/qt/Window.cpp @@ -1566,7 +1566,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();