diff options
author | Jaromir Wysoglad | 2019-07-18 14:01:04 -0700 |
---|---|---|
committer | Filippos Karapetis | 2019-09-01 22:47:55 +0300 |
commit | d31ffb676a57966248581926366d5eff6dee2ae7 (patch) | |
tree | 6e979f5311a3e5edd0b2ed8705af6ae7e8de6090 /backends/text-to-speech/windows | |
parent | 5c1f562452e201a968063e176b55fc14d912aea1 (diff) | |
download | scummvm-rg350-d31ffb676a57966248581926366d5eff6dee2ae7.tar.gz scummvm-rg350-d31ffb676a57966248581926366d5eff6dee2ae7.tar.bz2 scummvm-rg350-d31ffb676a57966248581926366d5eff6dee2ae7.zip |
TTS: Implement conversion to unicode in say on win
Diffstat (limited to 'backends/text-to-speech/windows')
-rw-r--r-- | backends/text-to-speech/windows/windows-text-to-speech.cpp | 3 |
1 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 32087f5ccb..c646b9b3b3 100644 --- a/backends/text-to-speech/windows/windows-text-to-speech.cpp +++ b/backends/text-to-speech/windows/windows-text-to-speech.cpp @@ -32,6 +32,7 @@ #include <sapi.h> #include "backends/text-to-speech/windows/sphelper-scummvm.h" #include "backends/platform/sdl/win32/win32_wrapper.h" +#include "backends/platform/sdl/win32/codepage.h" #include "backends/text-to-speech/windows/windows-text-to-speech.h" @@ -113,7 +114,7 @@ bool WindowsTextToSpeechManager::say(Common::String str, Common::String charset) Common::String pitch= Common::String::format("<pitch absmiddle=\"%d\">", _ttsState->_pitch / 10); str.replace((uint32)0, 0, pitch); - WCHAR *strW = Win32::ansiToUnicode(str.c_str()); + WCHAR *strW = Win32::ansiToUnicode(str.c_str(), Win32::getCodePageId(charset)); bool result = _voice->Speak(strW, SPF_ASYNC | SPF_PURGEBEFORESPEAK, NULL) != S_OK; free(strW); _speechState = SPEAKING; |