Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Other fixes:
- Qt: Fix potential crash when configuring shortcuts
- Qt: Fix regression where loading BIOS creates a save file (fixes mgba.io/i/3359)
- Qt: Fix selecting high tiles in tile and map views (fixes mgba.io/i/3461)
- Qt: Fix unexpected mute when window becomes focused while fast-forwarding
Misc:
- 3DS: Change title ID to avoid conflict with commercial title (fixes mgba.io/i/3023)
- Core: Handle relative paths for saves, screenshots, etc consistently (fixes mgba.io/i/2826)
Expand Down
8 changes: 3 additions & 5 deletions src/platform/qt/CoreController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void CoreController::loadConfig(ConfigController* config) {
m_autoload = config->getOption("autoload", true).toInt();
m_autofireThreshold = config->getOption("autofireThreshold", m_autofireThreshold).toInt();
m_fastForwardVolume = config->getOption("fastForwardVolume", -1).toInt();
m_fastForwardMute = config->getOption("fastForwardMute", -1).toInt();
m_fastForwardMute = config->getOption("fastForwardMute", false).toBool();
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "volume");
mCoreConfigCopyValue(&m_threadContext.core->config, config->config(), "mute");
m_preload = config->getOption("preload", true).toInt();
Expand Down Expand Up @@ -640,7 +640,7 @@ void CoreController::overrideMute(bool override) {
core->opts.mute = true;
} else {
if (m_fastForward || m_fastForwardForced) {
core->opts.mute = m_fastForwardMute >= 0;
core->opts.mute = m_fastForwardMute;
} else {
mCoreConfigGetBoolValue(&core->config, "mute", &core->opts.mute);
}
Expand Down Expand Up @@ -1306,9 +1306,7 @@ void CoreController::updateFastForward() {
if (m_fastForwardVolume >= 0) {
m_threadContext.core->opts.volume = m_fastForwardVolume;
}
if (m_fastForwardMute >= 0) {
m_threadContext.core->opts.mute = m_fastForwardMute || m_mute;
}
m_threadContext.core->opts.mute = m_fastForwardMute || m_mute;
setSync(false);

// If we aren't holding the fast forward button
Expand Down
2 changes: 1 addition & 1 deletion src/platform/qt/CoreController.h
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public slots:
int m_fastForward = false;
int m_fastForwardForced = false;
int m_fastForwardVolume = -1;
int m_fastForwardMute = -1;
bool m_fastForwardMute = false;
float m_fastForwardRatio = -1.f;
float m_fastForwardHeldRatio = -1.f;
float m_fpsTarget;
Expand Down
6 changes: 3 additions & 3 deletions src/platform/qt/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ void Window::showEvent(QShowEvent* event) {
}

if (m_config->getOption("muteOnMinimize").toInt()) {
m_inactiveMute = false;
m_minimizedMute = false;
updateMute();
}
}
Expand Down Expand Up @@ -781,7 +781,7 @@ void Window::hideEvent(QHideEvent* event) {
m_controller->setPaused(true);
}
if (m_config->getOption("muteOnMinimize").toInt()) {
m_inactiveMute = true;
m_minimizedMute = false;
updateMute();
}
}
Expand Down Expand Up @@ -2336,7 +2336,7 @@ void Window::updateMute() {
return;
}

bool mute = m_inactiveMute;
bool mute = m_inactiveMute || m_minimizedMute;

if (!mute) {
QString multiplayerAudio = m_config->getQtOption("multiplayerAudio").toString();
Expand Down
1 change: 1 addition & 0 deletions src/platform/qt/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@ private slots:
bool m_hitUnimplementedBiosCall;

bool m_inactiveMute = false;
bool m_minimizedMute = false;
bool m_multiActive = true;
int m_playerId;

Expand Down