RetroArch config file is now saved with commas instead of periods

I’m using RetroArch on Manjaro, and since a recent system update (I’ve not updated RetroArch), my whole config file was changed when I opened RetroArch.

All the config lines that used a period, have been replaced by commas.

Here’s an example of a changed config line:

menu_wallpaper_opacity = "0.000000"
is now:
menu_wallpaper_opacity = "0,000000"

Is this expected? Why did this happen? What system library does RetroArch use on Linux that could’ve cause this change recently? I can’t pinpoint exactly which package is the culprit.

1 Like

Ok, I thought this was harmless, but it seems some values are being rounded up during saving.

For example, if I have this in the config:

audio_rate_control_delta = "0.005000"
when you exit RetroArch it gets rounded and saved as:
audio_rate_control_delta = "0,000000"

This completely ruins the config file.

I’m on EndeavourOS, so a pretty similar system and it’s up to date (but RetroArch still on 1.15). And opening RetroArch, running a game and closing it does not change any of the periods/commas. This is obviously a pretty serious issue. When does it change? Does this happen again, if you change those characters manually? Does this happen with other files too?

I hope you do occasionally backups, so you could easily copy the file back. If not, I could provide a sed command to change them all at once back.

This changes when RetroArch exits, which is when it writes to the config files.

Yes, they always get reverted back to commas.

This happens with my multiple config files (I use overrides).

I have my config files in a git repository, so it’s easier for me to see what’s changing.

And I found another funny thing:
The 1st time I run RetroArch, it just changes the periods to commas, but it retains the decimal values.
The 2nd time I run RetroArch (after the periods were replaced), it rounds the numbers to the nearest integer, and that’s when everything gets broken.

I’m on RetroArch 1.16.0 compiled from the v1.16.0.1 tag.

Reverted to tag 1.15.0 and the problem is still there, so it was not a RetroArch change.

What’s your locale? @thingsiplay Mine is Portugal, where the comma is the decimal separator.
But this shouldn’t influence how a config file is saved.

1 Like

I’m in Germany, but since recent OS installations I only use English as the base on KDE. So it’s kinda a mixture between English and German. But I noticed that the output from $ locale command does not match the settings found in KDE “Region & Language”. In example $ locale has setting LC_NUMERIC=de_DE.UTF-8, but in KDE it’s set to “Default for American English: 1,000.01”.

The point is, there is a miss match, I don’t experience any problems yet. Little bit confusing right now, but that’s how things are for me.

I have my system language set to English, but my LC_NUMERIC reads pt_PT.UTF-8.
And yes, I have the same mismatch as you on the KDE settings. But I don’t think that’s the source of the issue.

I have now tried running RetroArch as LC_NUMERIC=de_DE.UTF-8 retroarch and everything is working fine!
I know Germany also uses commas as the decimal separator, so I found it strange that you don’t have the bug, but then I noticed this in the logs when using de_DE.UTF-8:

(process:57652): Gtk-WARNING **: 21:51:01.960: Locale not supported by C library.
    Using the fallback 'C' locale.

Do you also have this warning message in the logs?

1 Like

Which log file do you mean? In the terminal running retroarch --verbose does not show me such a warning.

At least there are people reporting locale issues with Manjaro (and myself had it with EndeavourOS, where I cannot set my locale time to English, it has to be German to work properly). Here a thread that might be interesting to look into: https://forum.endeavouros.com/t/issues-with-locale-settings/6691

Edit: The command $ locale -a should output the supported locales on my system. And the UTF-8 part is output as de_DE.utf8. Might this be an issue with the system itself where that part has to be in lowercase? I don’t want change and experiment with it, so it does not get broken. But thats interesting and strange.

Mine outputs this:

C
C.UTF-8
en_US.utf8
POSIX
pt_PT.utf8

And maybe that’s why I get that warning and it falls back to C.

But we digress. Irrespective of how locales are handled on our OSs, I think something is wrong if RetroArch depends on the locale to write decimal values to the config files.

The decimal value on the config files should always be the same, so that the config can be more portable.

This is not to mention the worst problem, which is the fact that the values are being rounded to integers.

Right, we digress a little bit. But on the other hand, if you change the locale temporarily, it seems to work on your end. So there might be a connection there. Is it a problem with RetroArch? Hard to say.

BTW, interestingly the C.UTF-8 output on your end is C.utf8 on mine. And yes, that would explain why it falls back to C if you try de_DE. Which suggest that it might be a problem only with pt_PT based locales.

So you say it started happening with recent system update? But why would RetroArch config file depend on any system update? That’s the question. So it looks like a bug in RetroArch. Just assuming here.

Tried with de_DE.utf8 but the same warning showed up and it defaulted back to C.

Also, I’ve tried with en_US and the problem does not occur (period is their decimal separator).

It’s still very strange that it’s not happening to you.

That’s right. I think I’ll open an issue for it.

I’ve opened an issue for it here, if anyone wants to discuss it further:

1 Like

Looks like the issue was already reported recently here:

1 Like

For anyone interested in this issue, this was a problem on libdecor and as now been fixed with this merge request:

2 Likes