mirror of https://github.com/mgba-emu/mgba.git
Core: Put back mute
This commit is contained in:
parent
cf27d88696
commit
dedcaeb51d
|
@ -70,7 +70,11 @@ static void _GBCoreLoadConfig(struct mCore* core, const struct mCoreConfig* conf
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -77,7 +77,11 @@ static void _GBACoreSetSync(struct mCore* core, struct mCoreSync* sync) {
|
|||
|
||||
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
|
||||
|
|
|
@ -848,12 +848,6 @@ void GameController::saveBackupState() {
|
|||
});
|
||||
}
|
||||
|
||||
void GameController::setMute(bool mute) {
|
||||
threadInterrupt();
|
||||
// TODO: Put back mute
|
||||
threadContinue();
|
||||
}
|
||||
|
||||
void GameController::setTurbo(bool set, bool forced) {
|
||||
if (m_turboForced && !forced) {
|
||||
return;
|
||||
|
|
|
@ -132,7 +132,6 @@ public slots:
|
|||
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*);
|
||||
|
|
|
@ -1139,7 +1139,7 @@ void Window::setupMenu(QMenuBar* menubar) {
|
|||
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");
|
||||
|
||||
|
|
Loading…
Reference in New Issue