mirror of https://github.com/snes9xgit/snes9x.git
GTK+: Set locale to C when loading shader files.
We can't know what format they're in, and for some reason español breaks them.
This commit is contained in:
parent
51d3051712
commit
b9ad162723
|
@ -362,6 +362,8 @@ int S9xOpenGLDisplayDriver::load_shaders (const char *shader_file)
|
|||
{
|
||||
int length = strlen (shader_file);
|
||||
|
||||
setlocale (LC_ALL, "C");
|
||||
|
||||
if ((length > 6 && !strcasecmp(shader_file + length - 6, ".glslp")) ||
|
||||
(length > 5 && !strcasecmp(shader_file + length - 5, ".glsl")))
|
||||
{
|
||||
|
@ -374,12 +376,14 @@ int S9xOpenGLDisplayDriver::load_shaders (const char *shader_file)
|
|||
if (glsl_shader->param.size () > 0)
|
||||
window->enable_widget ("shader_parameters_item", TRUE);
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
return 1;
|
||||
}
|
||||
|
||||
delete glsl_shader;
|
||||
}
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ int main (int argc, char *argv[])
|
|||
g_set_prgname ("snes9x");
|
||||
g_set_application_name ("Snes9x");
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
bindtextdomain (GETTEXT_PACKAGE, SNES9XLOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
|
Loading…
Reference in New Issue