Skip to content

Commit 4be34f4

Browse files
committed
Ignore sound format in TFTD
1 parent 70979ff commit 4be34f4

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎src/Engine/Options.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ void create()
135135
_info.push_back(OptionInfo("geoDragScrollButton", &geoDragScrollButton, SDL_BUTTON_MIDDLE));
136136
_info.push_back(OptionInfo("preferredMusic", (int*)&preferredMusic, MUSIC_AUTO));
137137
_info.push_back(OptionInfo("preferredSound", (int*)&preferredSound, SOUND_AUTO));
138+
_info.push_back(OptionInfo("preferredVideo", (int*)&preferredVideo, VIDEO_FMV));
138139
_info.push_back(OptionInfo("musicAlwaysLoop", &musicAlwaysLoop, false));
139140

140141
// advanced options

‎src/Menu/OptionsAudioState.cpp‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,9 +188,11 @@ OptionsAudioState::OptionsAudioState(OptionsOrigin origin) : OptionsBaseState(or
188188
_txtMusicFormat->setVisible(_origin == OPT_MENU);
189189
_cbxMusicFormat->setVisible(_origin == OPT_MENU);
190190
_txtCurrentMusic->setVisible(_origin == OPT_MENU);
191-
_txtSoundFormat->setVisible(_origin == OPT_MENU);
192-
_cbxSoundFormat->setVisible(_origin == OPT_MENU);
193-
_txtCurrentSound->setVisible(_origin == OPT_MENU);
191+
192+
// These options only apply to UFO
193+
_txtSoundFormat->setVisible(_origin == OPT_MENU && _game->getRuleset()->getSoundDefinitions()->empty());
194+
_cbxSoundFormat->setVisible(_origin == OPT_MENU && _game->getRuleset()->getSoundDefinitions()->empty());
195+
_txtCurrentSound->setVisible(_origin == OPT_MENU && _game->getRuleset()->getSoundDefinitions()->empty());
194196
}
195197

196198
/**

0 commit comments

Comments
 (0)