aboutsummaryrefslogtreecommitdiff
path: root/gui/options.cpp
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-17 13:33:42 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit33f8aadfeb81ead60ce1264f0af681dcdbd4931f (patch)
tree445cc26d9d425eca0bf42a7c5ae436fb487916cc /gui/options.cpp
parent318c6d7ec6e5562d0fd3e9d70386d0fcde86cf12 (diff)
downloadscummvm-rg350-33f8aadfeb81ead60ce1264f0af681dcdbd4931f.tar.gz
scummvm-rg350-33f8aadfeb81ead60ce1264f0af681dcdbd4931f.tar.bz2
scummvm-rg350-33f8aadfeb81ead60ce1264f0af681dcdbd4931f.zip
TTS: Add age to TTSVoice
Diffstat (limited to 'gui/options.cpp')
-rw-r--r--gui/options.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/gui/options.cpp b/gui/options.cpp
index b82bfc6440..507ae34176 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -1808,8 +1808,10 @@ void GlobalOptionsDialog::build() {
for(unsigned i = 0; i < voices.size(); i++) {
_ttsVoiceSelectionPopUp->appendEntry(voices[i].getDescription(), i);
}
+ if (voices.size() == 0)
+ _ttsVoiceSelectionPopUp->appendEntry("None", 0);
- if (ConfMan.hasKey("tts_voice"))
+ if (ConfMan.hasKey("tts_voice") && (unsigned) ConfMan.getInt("tts_voice", _domain) < voices.size())
_ttsVoiceSelectionPopUp->setSelectedTag(ConfMan.getInt("tts_voice", _domain)) ;
else
_ttsVoiceSelectionPopUp->setSelectedTag(0);