From 9a7a7743bbad78d32a723a8a7c92393a348edc34 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Mon, 14 Oct 2019 01:23:57 +0200 Subject: TTS: Fix "No voice available" warning --- base/main.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'base') 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 -- cgit v1.2.3