diff options
author | Jaromir Wysoglad | 2019-07-30 16:17:56 +0200 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | bbbb608c528699f281fdd5a8a7d814dd44b9aa41 (patch) | |
tree | bd64682386ec79e1a8f3b00fe94885a52996e3cc /backends/graphics/opengl | |
parent | f89ca9ad5c28731b5a95525eb220d43fca55d14b (diff) | |
download | scummvm-rg350-bbbb608c528699f281fdd5a8a7d814dd44b9aa41.tar.gz scummvm-rg350-bbbb608c528699f281fdd5a8a7d814dd44b9aa41.tar.bz2 scummvm-rg350-bbbb608c528699f281fdd5a8a7d814dd44b9aa41.zip |
TTS: Implement OSD message reading
Diffstat (limited to 'backends/graphics/opengl')
-rw-r--r-- | backends/graphics/opengl/opengl-graphics.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/backends/graphics/opengl/opengl-graphics.cpp b/backends/graphics/opengl/opengl-graphics.cpp index a6f31e64fb..06a0109476 100644 --- a/backends/graphics/opengl/opengl-graphics.cpp +++ b/backends/graphics/opengl/opengl-graphics.cpp @@ -50,6 +50,10 @@ #include "image/bmp.h" #endif +#ifdef USE_TTS +#include "common/text-to-speech.h" +#endif + namespace OpenGL { OpenGLGraphicsManager::OpenGLGraphicsManager() @@ -780,7 +784,7 @@ void OpenGLGraphicsManager::displayMessageOnOSD(const char *msg) { _osdMessageChangeRequest = true; _osdMessageNextData = msg; -#endif +#endif // USE_OSD } #ifdef USE_OSD @@ -842,6 +846,14 @@ void OpenGLGraphicsManager::osdMessageUpdateSurface() { _osdMessageAlpha = kOSDMessageInitialAlpha; _osdMessageFadeStartTime = g_system->getMillis() + kOSDMessageFadeOutDelay; +#ifdef USE_TTS + if (ConfMan.hasKey("tts_enabled", "scummvm") && + ConfMan.getBool("tts_enabled", "scummvm")) { + Common::TextToSpeechManager *ttsMan = g_system->getTextToSpeechManager(); + if (ttsMan) + ttsMan->say(_osdMessageNextData); + } +#endif // USE_TTS // Clear the text update request _osdMessageNextData.clear(); _osdMessageChangeRequest = false; |