diff options
author | Jaromir Wysoglad | 2019-07-17 13:33:42 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | 33f8aadfeb81ead60ce1264f0af681dcdbd4931f (patch) | |
tree | 445cc26d9d425eca0bf42a7c5ae436fb487916cc /gui | |
parent | 318c6d7ec6e5562d0fd3e9d70386d0fcde86cf12 (diff) | |
download | scummvm-rg350-33f8aadfeb81ead60ce1264f0af681dcdbd4931f.tar.gz scummvm-rg350-33f8aadfeb81ead60ce1264f0af681dcdbd4931f.tar.bz2 scummvm-rg350-33f8aadfeb81ead60ce1264f0af681dcdbd4931f.zip |
TTS: Add age to TTSVoice
Diffstat (limited to 'gui')
-rw-r--r-- | gui/options.cpp | 4 | ||||
-rw-r--r-- | gui/widgets/popup.cpp | 2 |
2 files changed, 4 insertions, 2 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); diff --git a/gui/widgets/popup.cpp b/gui/widgets/popup.cpp index 532127a422..2fce6e126f 100644 --- a/gui/widgets/popup.cpp +++ b/gui/widgets/popup.cpp @@ -213,7 +213,7 @@ void PopUpDialog::handleMouseMoved(int x, int y, int button) { // ...and update the selection accordingly setSelection(item); - if (_lastRead != item) { + if (_lastRead != item && _popUpBoss->_entries.size() > 0 && item != -1) { read(_popUpBoss->_entries[item].name); _lastRead = item; } |