mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
fetch Extra Resolutions mod path from the settings schema
This commit is contained in:
parent
42ea458ccf
commit
e8396401f9
@ -363,7 +363,7 @@
|
||||
"type" : "object",
|
||||
"default": {},
|
||||
"additionalProperties" : false,
|
||||
"required" : [ "repositoryURL", "enableInstalledMods", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl" ],
|
||||
"required" : [ "repositoryURL", "enableInstalledMods", "extraResolutionsModPath", "autoCheckRepositories", "updateOnStartup", "updateConfigUrl" ],
|
||||
"properties" : {
|
||||
"repositoryURL" : {
|
||||
"type" : "array",
|
||||
@ -378,6 +378,10 @@
|
||||
"type" : "boolean",
|
||||
"default" : true
|
||||
},
|
||||
"extraResolutionsModPath" : {
|
||||
"type" : "string",
|
||||
"default" : "/vcmi-extras/Mods/extraResolutions/Content/config/resolutions.json"
|
||||
},
|
||||
"autoCheckRepositories" : {
|
||||
"type" : "boolean",
|
||||
"default" : true
|
||||
|
@ -121,7 +121,7 @@ void CSettingsView::fillValidResolutionsForScreen(int screenIndex)
|
||||
QVariantList resolutions;
|
||||
if(isExtraResolutionsModEnabled)
|
||||
{
|
||||
const QLatin1String extrasResolutionsPath{"/vcmi-extras/Mods/extraResolutions/Content/config/resolutions.json"};
|
||||
const auto extrasResolutionsPath = settings["launcher"]["extraResolutionsModPath"].String().c_str();
|
||||
const auto extrasResolutionsJson = JsonUtils::JsonFromFile(CLauncherDirs::get().modsPath() + extrasResolutionsPath);
|
||||
resolutions = extrasResolutionsJson.toMap().value(QLatin1String{"GUISettings"}).toList();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user