aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaromir Wysoglad2019-10-14 01:23:57 +0200
committerJaromir Wysoglad2019-10-14 01:34:54 +0200
commit9a7a7743bbad78d32a723a8a7c92393a348edc34 (patch)
tree3ee04da3812e38e22f9b2c4b18a107829f93c74a
parent1671779c05c7efe21855d5142db93a91d6f72372 (diff)
downloadscummvm-rg350-9a7a7743bbad78d32a723a8a7c92393a348edc34.tar.gz
scummvm-rg350-9a7a7743bbad78d32a723a8a7c92393a348edc34.tar.bz2
scummvm-rg350-9a7a7743bbad78d32a723a8a7c92393a348edc34.zip
TTS: Fix "No voice available" warning
-rw-r--r--base/main.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/base/main.cpp b/base/main.cpp
index a9602e0b6a..750e09ee87 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -264,9 +264,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
#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);
+ ttsMan->setLanguage(ConfMan.get("language"));
}
#endif // USE_TTS
}
@@ -301,9 +299,7 @@ static Common::Error runGame(const Plugin *plugin, OSystem &system, const Common
#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);
+ ttsMan->setLanguage(ConfMan.get("language"));
}
#endif // USE_TTS
#endif // USE_TRANSLATION