diff options
author | Jaromir Wysoglad | 2019-07-17 23:51:58 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | ce64528129d4a1ba51e339bd8be3548c4d8cc3bf (patch) | |
tree | a16ca7f095685ea95ea4ffa5c845db0f45ce9e46 /base | |
parent | 33f8aadfeb81ead60ce1264f0af681dcdbd4931f (diff) | |
download | scummvm-rg350-ce64528129d4a1ba51e339bd8be3548c4d8cc3bf.tar.gz scummvm-rg350-ce64528129d4a1ba51e339bd8be3548c4d8cc3bf.tar.bz2 scummvm-rg350-ce64528129d4a1ba51e339bd8be3548c4d8cc3bf.zip |
TTS: Make sure that TTS lang matches transMan lang
Diffstat (limited to 'base')
-rw-r--r-- | base/main.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/base/main.cpp b/base/main.cpp index 352dbf9ab4..656a24b94b 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -51,6 +51,7 @@ #include "common/textconsole.h" #include "common/tokenizer.h" #include "common/translation.h" +#include "common/text-to-speech.h" #include "common/osd_message_queue.h" #include "gui/gui-manager.h" @@ -260,8 +261,16 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common && ConfMan.getBool("gui_use_game_language") && ConfMan.hasKey("language")) { TransMan.setLanguage(ConfMan.get("language")); +#ifdef USE_TTS + Common::TextToSpeechManager *ttsMan; + if ((ttsMan = g_system->getTextToSpeechManager()) != nullptr) { + Common::String language = ConfMan.get("language"); + language.setChar(2, '\0'); + ttsMan->setLanguage(language); + } +#endif // USE_TTS } -#endif +#endif // USE_TRANSLATION // Initialize any game-specific keymaps engine->initKeymap(); @@ -289,7 +298,15 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common #ifdef USE_TRANSLATION TransMan.setLanguage(previousLanguage); -#endif +#ifdef USE_TTS + Common::TextToSpeechManager *ttsMan; + if ((ttsMan = g_system->getTextToSpeechManager()) != nullptr) { + Common::String language = ConfMan.get("language"); + language.setChar(2, '\0'); + ttsMan->setLanguage(language); + } +#endif // USE_TTS +#endif // USE_TRANSLATION // Return result (== 0 means no error) return result; |