MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / GlobalConfig

Method GlobalConfig

src/GlobalConfig.cpp:26–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24#include <SDL3/SDL_time.h>
25
26GlobalConfig::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
36nlohmann::json GlobalConfig::get_config_json(const InputManager& input) const {
37 using json = nlohmann::json;

Callers

nothing calls this directly

Calls 2

alphanumeric_strMethod · 0.80
getFunction · 0.50

Tested by

no test coverage detected