aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backends/text-to-speech/windows/windows-text-to-speech.cpp1
-rw-r--r--gui/gui-manager.cpp2
2 files changed, 2 insertions, 1 deletions
diff --git a/backends/text-to-speech/windows/windows-text-to-speech.cpp b/backends/text-to-speech/windows/windows-text-to-speech.cpp
index fec5a408d1..e9f28d966b 100644
--- a/backends/text-to-speech/windows/windows-text-to-speech.cpp
+++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp
@@ -49,7 +49,6 @@ ISpAudio *_audio;
WindowsTextToSpeechManager::WindowsTextToSpeechManager()
: _speechState(BROKEN){
- ConfMan.setInt("tts_voice", 0);
init();
}
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index b149908ffe..82f7591ae8 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -645,6 +645,8 @@ void GuiManager::initTextToSpeech() {
voice = ConfMan.getInt("tts_voice", "scummvm");
else
voice = 0;
+ if (voice >= ttsMan->getVoicesArray().size())
+ voice = 0;
ttsMan->setVoice(voice);
}
#endif