mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
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
This commit is contained in:
@ -18,6 +18,7 @@
|
||||
#include <stdio.h>
|
||||
#include <cmath>
|
||||
#include <assert.h>
|
||||
#include <locale.h>
|
||||
|
||||
#include "Profiler.h"
|
||||
#include "PixelShaderGen.h"
|
||||
@ -382,6 +383,7 @@ static void BuildSwapModeTable()
|
||||
|
||||
const char *GeneratePixelShader(u32 texture_mask, bool dstAlphaEnable, bool HLSL)
|
||||
{
|
||||
setlocale(LC_NUMERIC, "C"); // Reset locale for compilation
|
||||
text[sizeof(text) - 1] = 0x7C; // canary
|
||||
DVSTARTPROFILE();
|
||||
|
||||
@ -551,6 +553,7 @@ const char *GeneratePixelShader(u32 texture_mask, bool dstAlphaEnable, bool HLSL
|
||||
if (text[sizeof(text) - 1] != 0x7C)
|
||||
PanicAlert("PixelShader generator - buffer too small, canary has been eaten!");
|
||||
|
||||
setlocale(LC_NUMERIC, ""); // restore locale
|
||||
return text;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user