diff options
| author | nakeee <nakeee@gmail.com> | 2009-10-14 01:58:39 +0000 |
|---|---|---|
| committer | nakeee <nakeee@gmail.com> | 2009-10-14 01:58:39 +0000 |
| commit | 9f8a2986a2aed4aec25d787fbd6d2ed44214610b (patch) | |
| tree | eedc72ef813d780eedb31872723e3f473640081e /Source/Core/VideoCommon/Src/TextureConversionShader.cpp | |
| parent | fb60b10c7ba5197178e960645da6fafa29f18f83 (diff) | |
Videocommon: setlocale for shader compilation, should fix problem with runaway , in certain locales.
Please test issues 1533 and 1496
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4418 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureConversionShader.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/Src/TextureConversionShader.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp index c3a440009f..1263f52cfa 100644 --- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp +++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp @@ -18,6 +18,7 @@ #include <stdio.h> #include <math.h> +#include <locale.h> #include "Common.h" #include "TextureConversionShader.h" @@ -642,6 +643,7 @@ void WriteZ24Encoder(char* p) const char *GenerateEncodingShader(u32 format) { + setlocale(LC_NUMERIC, "C"); // Reset locale for compilation text[sizeof(text) - 1] = 0x7C; // canary char *p = text; @@ -725,6 +727,7 @@ const char *GenerateEncodingShader(u32 format) if (text[sizeof(text) - 1] != 0x7C) PanicAlert("TextureConversionShader generator - buffer too small, canary has been eaten!"); + setlocale(LC_NUMERIC, ""); // restore locale return text; } |
