Kaynağa Gözat

(config only) setting to disable async upscaling

Laserlicht 8 ay önce
ebeveyn
işleme
3627731041
2 değiştirilmiş dosya ile 12 ekleme ve 2 silme
  1. 6 1
      client/renderSDL/SDLImage.cpp
  2. 6 1
      config/schemas/settings.json

+ 6 - 1
client/renderSDL/SDLImage.cpp

@@ -20,6 +20,8 @@
 #include "../gui/CGuiHandler.h"
 #include "../render/IScreenHandler.h"
 
+#include "../../lib/CConfigHandler.h"
+
 #include <tbb/parallel_for.h>
 #include <tbb/task_arena.h>
 
@@ -264,7 +266,10 @@ SDLImageShared::SDLImageShared(const SDLImageShared * from, int integerScaleFact
 		upscalingInProgress = false;
 	};
 
-	upscalingArena.enqueue(scalingTask);
+	if(settings["video"]["asyncUpscaling"].Bool())
+		upscalingArena.enqueue(scalingTask);
+	else
+		scalingTask();
 }
 
 bool SDLImageShared::isLoading() const

+ 6 - 1
config/schemas/settings.json

@@ -194,7 +194,8 @@
 				"upscalingFilter",
 				"fontUpscalingFilter",
 				"downscalingFilter",
-				"allowPortrait"
+				"allowPortrait",
+				"asyncUpscaling"
 			],
 			"properties" : {
 				"resolution" : {
@@ -286,6 +287,10 @@
 				"allowPortrait" : {
 					"type" : "boolean",
 					"default" : false
+				},
+				"asyncUpscaling" : {
+					"type" : "boolean",
+					"default" : true
 				}
 			}
 		},