Set fixed locale for numbers, close to config read/write (#15782)
Move setlocale() closer to config file read/write.
This commit is contained in:
parent
466e82f55d
commit
232095797e
|
@ -18,6 +18,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
#include <locale.h>
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
#include <net/net_compat.h>
|
#include <net/net_compat.h>
|
||||||
#include <net/net_socket.h>
|
#include <net/net_socket.h>
|
||||||
|
@ -1166,6 +1167,10 @@ bool command_event_save_config(
|
||||||
const char *str = path_exists ? config_path :
|
const char *str = path_exists ? config_path :
|
||||||
path_get(RARCH_PATH_CONFIG);
|
path_get(RARCH_PATH_CONFIG);
|
||||||
|
|
||||||
|
/* Workaround for libdecor 0.2.0 setting unwanted locale */
|
||||||
|
#if defined(HAVE_WAYLAND) && defined(HAVE_DYNAMIC)
|
||||||
|
setlocale(LC_NUMERIC,"C");
|
||||||
|
#endif
|
||||||
if (path_exists && config_save_file(config_path))
|
if (path_exists && config_save_file(config_path))
|
||||||
{
|
{
|
||||||
snprintf(s, len, "%s \"%s\".",
|
snprintf(s, len, "%s \"%s\".",
|
||||||
|
|
|
@ -5917,6 +5917,10 @@ static bool retroarch_parse_input_and_config(
|
||||||
if (!(p_rarch->flags & RARCH_FLAGS_BLOCK_CONFIG_READ))
|
if (!(p_rarch->flags & RARCH_FLAGS_BLOCK_CONFIG_READ))
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
/* Workaround for libdecor 0.2.0 setting unwanted locale */
|
||||||
|
#if defined(HAVE_WAYLAND) && defined(HAVE_DYNAMIC)
|
||||||
|
setlocale(LC_NUMERIC,"C");
|
||||||
|
#endif
|
||||||
/* If this is a static build, load salamander
|
/* If this is a static build, load salamander
|
||||||
* config file first (sets RARCH_PATH_CORE) */
|
* config file first (sets RARCH_PATH_CORE) */
|
||||||
#if !defined(HAVE_DYNAMIC)
|
#if !defined(HAVE_DYNAMIC)
|
||||||
|
|
Loading…
Reference in New Issue