Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set fixed locale for numbers near config read/write #15782

Merged
merged 1 commit into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions command.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <locale.h>
#ifdef HAVE_NETWORKING
#include <net/net_compat.h>
#include <net/net_socket.h>
Expand Down Expand Up @@ -1166,6 +1167,10 @@ bool command_event_save_config(
const char *str = path_exists ? config_path :
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))
{
snprintf(s, len, "%s \"%s\".",
Expand Down
4 changes: 4 additions & 0 deletions retroarch.c
Original file line number Diff line number Diff line change
Expand Up @@ -5871,6 +5871,10 @@ static bool retroarch_parse_input_and_config(
if (!(p_rarch->flags & RARCH_FLAGS_BLOCK_CONFIG_READ))
#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
* config file first (sets RARCH_PATH_CORE) */
#if !defined(HAVE_DYNAMIC)
Expand Down