On macOS, calling SDL_Init with SDL_INIT_GAMECONTROLLER flag affects locale. In my case it sets to system locale.
Minimal program to reproduce error:
#include <stdio.h>
#include <locale.h>
#include <SDL2/SDL.h>
int main(int argc, char** argv) {
printf("%.2f | %s\n", 2.78, setlocale(LC_ALL, NULL));
int sdl_init_result = SDL_Init(SDL_INIT_VIDEO | SDL_INIT_GAMECONTROLLER);
printf("%.2f | %s\n", 2.78, setlocale(LC_ALL, NULL));
}
Results:
2.78 | C
2,78 | ru_RU.UTF-8
On Linux locale remains āCā, on macOS, as you can see, it changes to ru_RU.UTF-8 and so decimal delimiter changes to ā,ā which is not good.