1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00

scalingMode to config

This commit is contained in:
Laserlicht 2024-04-04 21:10:49 +02:00 committed by GitHub
parent c2f160326c
commit ff866bdfce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View File

@ -294,7 +294,7 @@ void ScreenHandler::initializeWindow()
SDL_RendererInfo info;
SDL_GetRendererInfo(mainRenderer, &info);
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "best");
SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, settings["video"]["scalingMode"].String().c_str());
logGlobal->info("Created renderer %s", info.name);
}

View File

@ -160,7 +160,8 @@
"displayIndex",
"showfps",
"targetfps",
"vsync"
"vsync",
"scalingMode"
],
"properties" : {
"resolution" : {
@ -223,6 +224,11 @@
"vsync" : {
"type" : "boolean",
"default" : true
},
"scalingMode" : {
"type" : "string",
"enum" : [ "nearest", "linear", "best" ],
"default" : "best"
}
}
},