浏览代码

scalingMode to config

Laserlicht 1 年之前
父节点
当前提交
ff866bdfce
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 1 1
      client/renderSDL/ScreenHandler.cpp
  2. 7 1
      config/schemas/settings.json

+ 1 - 1
client/renderSDL/ScreenHandler.cpp

@@ -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);
 }
 

+ 7 - 1
config/schemas/settings.json

@@ -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"
 				}
 			}
 		},