diff options
Diffstat (limited to 'src/Config.cpp')
-rw-r--r-- | src/Config.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Config.cpp b/src/Config.cpp index 146527a..f8dc3ed 100644 --- a/src/Config.cpp +++ b/src/Config.cpp @@ -52,6 +52,7 @@ namespace QuickMedia { if(config_initialized) return; + setlocale(LC_ALL, "C"); // Sigh... stupid C config_initialized = true; // Wtf? can't use static non-pointer config because it causes a segfault when setting config.theme. // It looks like a libc bug??? crashes for both gcc and clang. @@ -117,6 +118,13 @@ namespace QuickMedia { config->input.font_size = font_size_json.asDouble(); } + const Json::Value &video_json = json_root["video"]; + if(video_json.isObject()) { + const Json::Value &max_height_json = video_json["max_height"]; + if(max_height_json.isNumeric()) + config->video.max_height = max_height_json.asInt(); + } + const Json::Value &use_system_fonts_json = json_root["use_system_fonts"]; if(use_system_fonts_json.isBool()) config->use_system_fonts = use_system_fonts_json.asBool(); |