summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
diff options
context:
space:
mode:
authorArmada <jules.blok@gmail.com>2013-06-16 14:34:23 +0200
committerArmada <jules.blok@gmail.com>2013-06-16 14:51:38 +0200
commit9594cac42c7612977e1ef4c8493e52037f15abf9 (patch)
tree620042cf00657724bd4e66df2b53f7b8a07acbb6 /Source/Core/VideoCommon/Src/TextureConversionShader.cpp
parentfc7099a9057ee962ea4fd43bf049396d86065cf0 (diff)
Build fix: Android NDK doesn't support any locale switching.
Also, Mac OS X doesn't support DX9.
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureConversionShader.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureConversionShader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
index 573713a198..40873b903e 100644
--- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
+++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
@@ -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;
}