mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-23 12:44:02 +00:00
WIN32: Make WindowsTextToSpeechManager UNICODE compatible
This commit is contained in:
parent
544ab5a25b
commit
c5604b20e4
@ -416,10 +416,10 @@ void WindowsTextToSpeechManager::createVoice(void *cpVoiceToken) {
|
||||
}
|
||||
|
||||
Common::String WindowsTextToSpeechManager::lcidToLocale(LCID locale) {
|
||||
int nchars = GetLocaleInfoA(locale, LOCALE_SISO639LANGNAME, NULL, 0);
|
||||
char *languageCode = new char[nchars];
|
||||
GetLocaleInfoA(locale, LOCALE_SISO639LANGNAME, languageCode, nchars);
|
||||
Common::String result = languageCode;
|
||||
int nchars = GetLocaleInfo(locale, LOCALE_SISO639LANGNAME, NULL, 0);
|
||||
TCHAR *languageCode = new TCHAR[nchars];
|
||||
GetLocaleInfo(locale, LOCALE_SISO639LANGNAME, languageCode, nchars);
|
||||
Common::String result = Win32::tcharToString(languageCode);
|
||||
delete[] languageCode;
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user