Bug: SDL_Init() with SDL_INIT_GAMECONTROLLER flag changes locale

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.

And that would result in lots of unexpected results from, e.g., atof()

This is worth reporting at https://bugzilla.libsdl.org