summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--opengl.c9
-rw-r--r--opengl.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/opengl.c b/opengl.c
index a26a286f4..33a2fc724 100644
--- a/opengl.c
+++ b/opengl.c
@@ -225,6 +225,11 @@ glx_init_blur(session_t *ps) {
#ifdef CONFIG_VSYNC_OPENGL_GLSL
{
+ char *lc_numeric_old = mstrcpy(setlocale(LC_NUMERIC, NULL));
+ // Enforce LC_NUMERIC locale "C" here to make sure decimal point is sane
+ // Thanks to hiciu for reporting.
+ setlocale(LC_NUMERIC, "C");
+
static const char *FRAG_SHADER_BLUR_PREFIX =
"#version 110\n"
"%s"
@@ -331,6 +336,10 @@ glx_init_blur(session_t *ps) {
#undef P_GET_UNIFM_LOC
}
free(extension);
+
+ // Restore LC_NUMERIC
+ setlocale(LC_NUMERIC, lc_numeric_old);
+ free(lc_numeric_old);
}
diff --git a/opengl.h b/opengl.h
index eae8bcf86..564b7e20a 100644
--- a/opengl.h
+++ b/opengl.h
@@ -11,6 +11,7 @@
#include "common.h"
#include <ctype.h>
+#include <locale.h>
#ifdef DEBUG_GLX_ERR