| 24 | #include <SDL3/SDL_time.h> |
| 25 | |
| 26 | GlobalConfig::GlobalConfig() { |
| 27 | load_default_palette(); |
| 28 | displayName = Random::get().alphanumeric_str(10); |
| 29 | SDL_GetDateTimeLocalePreferences(&dateFormat, &timeFormat); |
| 30 | if(dateFormat == SDL_DATE_FORMAT_YYYYMMDD) // Can't display this in a friendly way, so changing it for now |
| 31 | dateFormat = SDL_DATE_FORMAT_DDMMYYYY; |
| 32 | if(timeFormat == SDL_TIME_FORMAT_24HR) |
| 33 | timeFormat = SDL_TIME_FORMAT_12HR; // For now, lock at 12 hour since it's the most used format, and time format detection doesn't work properly all the time |
| 34 | } |
| 35 | |
| 36 | nlohmann::json GlobalConfig::get_config_json(const InputManager& input) const { |
| 37 | using json = nlohmann::json; |
nothing calls this directly
no test coverage detected