summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2014-12-05 20:54:41 -0500
committerLioncash <mathew1800@gmail.com>2014-12-05 20:55:29 -0500
commit9bcadc8029b615d3d447a2a875fd720a73255d11 (patch)
tree6812478b8ec5508dd2556c79f5a429a79c9910f9 /Source/Core/VideoCommon
parentf7a16eca84a868b5dcce113ece3e84d21347feae (diff)
Common: Remove locale based functions from CommonFuncs.
Since %f isn't used anymore in the shader generators, these can go.
Diffstat (limited to 'Source/Core/VideoCommon')
-rw-r--r--Source/Core/VideoCommon/GeometryShaderGen.cpp18
-rw-r--r--Source/Core/VideoCommon/PixelShaderGen.cpp18
-rw-r--r--Source/Core/VideoCommon/TextureConversionShader.cpp12
-rw-r--r--Source/Core/VideoCommon/VertexShaderGen.cpp18
4 files changed, 0 insertions, 66 deletions
diff --git a/Source/Core/VideoCommon/GeometryShaderGen.cpp b/Source/Core/VideoCommon/GeometryShaderGen.cpp
index 83a590a7ed..f9a8704269 100644
--- a/Source/Core/VideoCommon/GeometryShaderGen.cpp
+++ b/Source/Core/VideoCommon/GeometryShaderGen.cpp
@@ -3,10 +3,6 @@
// Refer to the license.txt file included.
#include <cmath>
-#include <locale.h>
-#ifdef __APPLE__
- #include <xlocale.h>
-#endif
#include "VideoCommon/GeometryShaderGen.h"
#include "VideoCommon/LightingShaderGen.h"
@@ -26,15 +22,6 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy
out.SetBuffer(text);
const bool is_writing_shadercode = (out.GetBuffer() != nullptr);
-#ifndef ANDROID
- locale_t locale;
- locale_t old_locale;
- if (is_writing_shadercode)
- {
- locale = newlocale(LC_NUMERIC_MASK, "C", nullptr); // New locale for compilation
- old_locale = uselocale(locale); // Apply the locale for this thread
- }
-#endif
if (is_writing_shadercode)
text[sizeof(text) - 1] = 0x7C; // canary
@@ -115,11 +102,6 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy
{
if (text[sizeof(text) - 1] != 0x7C)
PanicAlert("GeometryShader generator - buffer too small, canary has been eaten!");
-
-#ifndef ANDROID
- uselocale(old_locale); // restore locale
- freelocale(locale);
-#endif
}
}
diff --git a/Source/Core/VideoCommon/PixelShaderGen.cpp b/Source/Core/VideoCommon/PixelShaderGen.cpp
index ae27c3f586..4086343699 100644
--- a/Source/Core/VideoCommon/PixelShaderGen.cpp
+++ b/Source/Core/VideoCommon/PixelShaderGen.cpp
@@ -5,10 +5,6 @@
#include <cassert>
#include <cmath>
#include <cstdio>
-#include <locale.h>
-#ifdef __APPLE__
- #include <xlocale.h>
-#endif
#include "VideoCommon/BoundingBox.h"
#include "VideoCommon/BPMemory.h"
@@ -160,15 +156,6 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
out.SetBuffer(text);
const bool is_writing_shadercode = (out.GetBuffer() != nullptr);
-#ifndef ANDROID
- locale_t locale;
- locale_t old_locale;
- if (is_writing_shadercode)
- {
- locale = newlocale(LC_NUMERIC_MASK, "C", nullptr); // New locale for compilation
- old_locale = uselocale(locale); // Apply the locale for this thread
- }
-#endif
if (is_writing_shadercode)
text[sizeof(text) - 1] = 0x7C; // canary
@@ -596,11 +583,6 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
{
if (text[sizeof(text) - 1] != 0x7C)
PanicAlert("PixelShader generator - buffer too small, canary has been eaten!");
-
-#ifndef ANDROID
- uselocale(old_locale); // restore locale
- freelocale(locale);
-#endif
}
}
diff --git a/Source/Core/VideoCommon/TextureConversionShader.cpp b/Source/Core/VideoCommon/TextureConversionShader.cpp
index 1ab973d11b..8734eb42c3 100644
--- a/Source/Core/VideoCommon/TextureConversionShader.cpp
+++ b/Source/Core/VideoCommon/TextureConversionShader.cpp
@@ -4,10 +4,6 @@
#include <cmath>
#include <cstdio>
-#include <locale.h>
-#ifdef __APPLE__
- #include <xlocale.h>
-#endif
#include "Common/MathUtil.h"
#include "VideoCommon/BPMemory.h"
@@ -579,10 +575,6 @@ static 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", nullptr); // 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;
@@ -666,10 +658,6 @@ 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;
}
diff --git a/Source/Core/VideoCommon/VertexShaderGen.cpp b/Source/Core/VideoCommon/VertexShaderGen.cpp
index 26d6942372..6ce3a453b9 100644
--- a/Source/Core/VideoCommon/VertexShaderGen.cpp
+++ b/Source/Core/VideoCommon/VertexShaderGen.cpp
@@ -3,10 +3,6 @@
// Refer to the license.txt file included.
#include <cmath>
-#include <locale.h>
-#ifdef __APPLE__
- #include <xlocale.h>
-#endif
#include "VideoCommon/BPMemory.h"
#include "VideoCommon/CPMemory.h"
@@ -66,15 +62,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
out.SetBuffer(text);
const bool is_writing_shadercode = (out.GetBuffer() != nullptr);
-#ifndef ANDROID
- locale_t locale;
- locale_t old_locale;
- if (is_writing_shadercode)
- {
- locale = newlocale(LC_NUMERIC_MASK, "C", nullptr); // New locale for compilation
- old_locale = uselocale(locale); // Apply the locale for this thread
- }
-#endif
if (is_writing_shadercode)
text[sizeof(text) - 1] = 0x7C; // canary
@@ -465,11 +452,6 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
{
if (text[sizeof(text) - 1] != 0x7C)
PanicAlert("VertexShader generator - buffer too small, canary has been eaten!");
-
-#ifndef ANDROID
- uselocale(old_locale); // restore locale
- freelocale(locale);
-#endif
}
}