aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/gui-manager.cpp4
-rw-r--r--gui/options.cpp9
-rw-r--r--gui/widget.cpp4
3 files changed, 17 insertions, 0 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp
index 89d7d45b81..f33fc39a6f 100644
--- a/gui/gui-manager.cpp
+++ b/gui/gui-manager.cpp
@@ -625,6 +625,10 @@ void GuiManager::setLastMousePos(int16 x, int16 y) {
#ifdef USE_TTS
void GuiManager::initTextToSpeech() {
+#if defined(USE_TRANSLATION) && defined(USE_LINUX_TTS)
+ if(ConfMan.hasKey("gui_language") && ConfMan.get("gui_language") != "C")
+ warning("TTS on linux is supported only for english");
+#endif
int voice;
if(ConfMan.hasKey("tts_voice"))
voice = ConfMan.getInt("tts_voice", "scummvm");
diff --git a/gui/options.cpp b/gui/options.cpp
index b871e92d11..e0e0cdf6b7 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2149,6 +2149,15 @@ void GlobalOptionsDialog::apply() {
error.runModal();
}
#ifdef USE_TTS
+ bool ttsCheckboxChanged = _ttsCheckbox->getState() &&
+ (!ConfMan.hasKey("tts_enabled") || !ConfMan.getBool("tts_enabled"));
+ bool languageChanged = (newLang != oldLang);
+ if (ttsCheckboxChanged || languageChanged) {
+#if defined(USE_TRANSLATION) && defined(USE_LINUX_TTS)
+ if (ConfMan.get("gui_language") != "C")
+ warning("TTS on linux is supported only for english");
+#endif
+ }
ConfMan.setBool("tts_enabled", _ttsCheckbox->getState(), _domain);
int selectedVoice = _ttsVoiceSelectionPopUp->getSelectedTag();
ConfMan.setInt("tts_voice", selectedVoice, _domain);
diff --git a/gui/widget.cpp b/gui/widget.cpp
index d02d64fbeb..1a3986ef43 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -258,6 +258,10 @@ Common::String Widget::cleanupHotkey(const Common::String &label) {
void Widget::read(Common::String str) {
#ifdef USE_TTS
+#if defined(USE_LINUX_TTS) && defined(USE_TRANSLATION)
+ if (ConfMan.get("gui_language") != "C")
+ return;
+#endif
if (ConfMan.hasKey("tts_enabled", "scummvm") &&
ConfMan.getBool("tts_enabled", "scummvm")) {
int volume = (ConfMan.getInt("speech_volume", "scummvm") * 100) / 256;