Renamed the menu option to enable or disable audio playback for gamelist videos.

This commit is contained in:
Leon Styhre 2022-02-20 16:07:27 +01:00
parent e92af0548c
commit a97e86a6aa
3 changed files with 9 additions and 10 deletions

View file

@ -856,14 +856,13 @@ void GuiMenu::openSoundOptions()
if (UIModeController::getInstance()->isUIModeFull()) {
// Play audio for gamelist videos.
auto gamelist_video_audio = std::make_shared<SwitchComponent>();
gamelist_video_audio->setState(Settings::getInstance()->getBool("GamelistVideoAudio"));
s->addWithLabel("PLAY AUDIO FOR VIDEOS IN THE GAMELIST VIEW", gamelist_video_audio);
s->addSaveFunc([gamelist_video_audio, s] {
if (gamelist_video_audio->getState() !=
Settings::getInstance()->getBool("GamelistVideoAudio")) {
Settings::getInstance()->setBool("GamelistVideoAudio",
gamelist_video_audio->getState());
auto viewsVideoAudio = std::make_shared<SwitchComponent>();
viewsVideoAudio->setState(Settings::getInstance()->getBool("ViewsVideoAudio"));
s->addWithLabel("PLAY AUDIO FOR GAMELIST AND SYSTEM VIEW VIDEOS", viewsVideoAudio);
s->addSaveFunc([viewsVideoAudio, s] {
if (viewsVideoAudio->getState() !=
Settings::getInstance()->getBool("ViewsVideoAudio")) {
Settings::getInstance()->setBool("ViewsVideoAudio", viewsVideoAudio->getState());
s->setNeedsSaving();
}
});

View file

@ -196,7 +196,7 @@ void Settings::setDefaults()
// Sound settings.
mIntMap["SoundVolumeNavigation"] = {70, 70};
mIntMap["SoundVolumeVideos"] = {80, 80};
mBoolMap["GamelistVideoAudio"] = {true, true};
mBoolMap["ViewsVideoAudio"] = {true, true};
mBoolMap["MediaViewerVideoAudio"] = {true, true};
mBoolMap["ScreensaverVideoAudio"] = {true, true};
mBoolMap["NavigationSounds"] = {true, true};

View file

@ -786,7 +786,7 @@ void VideoFFmpegComponent::outputFrames()
bool outputSound = false;
if ((!mScreensaverMode && !mMediaViewerMode) &&
Settings::getInstance()->getBool("GamelistVideoAudio"))
Settings::getInstance()->getBool("ViewsVideoAudio"))
outputSound = true;
else if (mScreensaverMode && Settings::getInstance()->getBool("ScreensaverVideoAudio"))
outputSound = true;