aboutsummaryrefslogtreecommitdiff
path: root/gui/gui-manager.cpp
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-07-19 09:56:26 +0200
committerFilippos Karapetis2019-09-01 22:47:55 +0300
commit3027acc12e97fe92f617dd4a95a5861625773c38 (patch)
treed91e28dc4361f8c47688f363265a5c248daf322a /gui/gui-manager.cpp
parentb5d5576f90c177c54170a4e68b251c2fd5219260 (diff)
downloadscummvm-rg350-3027acc12e97fe92f617dd4a95a5861625773c38.tar.gz
scummvm-rg350-3027acc12e97fe92f617dd4a95a5861625773c38.tar.bz2
scummvm-rg350-3027acc12e97fe92f617dd4a95a5861625773c38.zip
TTS: Minor refactorisations
- Add comment to tts initialization on Windows - Correctly free the voicesInfo in linux ttsMan - Remove popState method from linux-text-to-speech.h and windows-text-to-speech.h - Add tts to help in configure - Refactor language setting in gui-manager.cpp It counted with english being the default language in ttsMan constructors, which isn't true anymore.
Diffstat (limited to 'gui/gui-manager.cpp')
-rw-r--r--gui/gui-manager.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 82f7591ae8..9f4af81e42 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -630,10 +630,11 @@ void GuiManager::initTextToSpeech() {
return;
#ifdef USE_TRANSLATION
Common::String currentLanguage = TransMan.getCurrentLanguage();
- if (currentLanguage != "C") {
+ if (currentLanguage == "C")
+ currentLanguage = "en";
+ else
currentLanguage.setChar('\0', 2);
- ttsMan->setLanguage(currentLanguage);
- }
+ ttsMan->setLanguage(currentLanguage);
#endif
int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256;
if (ConfMan.hasKey("mute", "scummvm") && ConfMan.getBool("mute", "scummvm"))