From 9f8a2986a2aed4aec25d787fbd6d2ed44214610b Mon Sep 17 00:00:00 2001 From: nakeee Date: Wed, 14 Oct 2009 01:58:39 +0000 Subject: 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 --- Source/Core/VideoCommon/Src/VertexShaderGen.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Source/Core/VideoCommon/Src/VertexShaderGen.cpp') diff --git a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp index 1cfc509e22..a49f83a71e 100644 --- a/Source/Core/VideoCommon/Src/VertexShaderGen.cpp +++ b/Source/Core/VideoCommon/Src/VertexShaderGen.cpp @@ -16,6 +16,7 @@ // http://code.google.com/p/dolphin-emu/ #include +#include #include "Profiler.h" #include "NativeVertexFormat.h" @@ -80,6 +81,7 @@ char *GenerateLightShader(char* p, int index, const LitChannel& chan, const char const char *GenerateVertexShader(u32 components, bool D3D) { + setlocale(LC_NUMERIC, "C"); // Reset locale for compilation text[sizeof(text) - 1] = 0x7C; // canary DVSTARTPROFILE(); @@ -496,5 +498,6 @@ char* GenerateLightShader(char* p, int index, const LitChannel& chan, const char } WRITE(p, "\n"); + setlocale(LC_NUMERIC, ""); // restore locale return p; } -- cgit v1.2.3