mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Build fix: Android NDK doesn't support any locale switching.
Also, Mac OS X doesn't support DX9.
This commit is contained in:
@ -807,8 +807,10 @@ void WriteZ24Encoder(char* p, API_TYPE ApiType)
|
||||
|
||||
const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)
|
||||
{
|
||||
#ifndef ANDROID
|
||||
locale_t locale = newlocale(LC_NUMERIC_MASK, "C", NULL); // New locale for compilation
|
||||
locale_t old_locale = uselocale(locale); // Apply the locale for this thread
|
||||
#endif
|
||||
text[sizeof(text) - 1] = 0x7C; // canary
|
||||
|
||||
char *p = text;
|
||||
@ -891,9 +893,11 @@ const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)
|
||||
|
||||
if (text[sizeof(text) - 1] != 0x7C)
|
||||
PanicAlert("TextureConversionShader generator - buffer too small, canary has been eaten!");
|
||||
|
||||
|
||||
#ifndef ANDROID
|
||||
uselocale(old_locale); // restore locale
|
||||
freelocale(locale);
|
||||
#endif
|
||||
return text;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user