all repos — mgba @ dedcaeb51d1e0f366f58f71d3da9d13be4f89c82

mGBA Game Boy Advance Emulator

Core: Put back mute
Jeffrey Pfau jeffrey@endrift.com
Sun, 21 Feb 2016 08:50:21 -0800
commit

dedcaeb51d1e0f366f58f71d3da9d13be4f89c82

parent

cf27d88696eb3b889e0cb40709e572a7c4036283

M src/gb/core.csrc/gb/core.c

@@ -70,7 +70,11 @@ static void _GBCoreLoadConfig(struct mCore* core, const struct mCoreConfig* config) {

UNUSED(config); struct GB* gb = core->board; - gb->audio.masterVolume = core->opts.volume; + if (core->opts.mute) { + gb->audio.masterVolume = 0; + } else { + gb->audio.masterVolume = core->opts.volume; + } gb->video.frameskip = core->opts.frameskip; }
M src/gba/core.csrc/gba/core.c

@@ -77,7 +77,11 @@ }

static void _GBACoreLoadConfig(struct mCore* core, const struct mCoreConfig* config) { struct GBA* gba = core->board; - gba->audio.masterVolume = core->opts.volume; + if (core->opts.mute) { + gba->audio.masterVolume = 0; + } else { + gba->audio.masterVolume = core->opts.volume; + } gba->video.frameskip = core->opts.frameskip; #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2
M src/platform/qt/GameController.cppsrc/platform/qt/GameController.cpp

@@ -848,12 +848,6 @@ controller->m_backupSaveState.clear();

}); } -void GameController::setMute(bool mute) { - threadInterrupt(); - // TODO: Put back mute - threadContinue(); -} - void GameController::setTurbo(bool set, bool forced) { if (m_turboForced && !forced) { return;
M src/platform/qt/GameController.hsrc/platform/qt/GameController.h

@@ -132,7 +132,6 @@ void loadState(int slot = 0);

void saveState(int slot = 0); void loadBackupState(); void saveBackupState(); - void setMute(bool); void setTurbo(bool, bool forced = true); void setTurboSpeed(float ratio = -1); void setAVStream(mAVStream*);
M src/platform/qt/Window.cppsrc/platform/qt/Window.cpp

@@ -1139,7 +1139,7 @@

ConfigOption* mute = m_config->addOption("mute"); mute->addBoolean(tr("Mute"), avMenu); mute->connect([this](const QVariant& value) { - m_controller->setMute(value.toBool()); + reloadConfig(); }, this); m_config->updateOption("mute");