[Scummvm-git-logs] scummvm master -> 0f7fa00c9b2e6a50a3b871c3af5e67425002ea1f

lephilousophe noreply at scummvm.org
Sun Oct 9 07:46:06 UTC 2022


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
0f7fa00c9b BACKENDS: OPENGL: Fix parsing of scale_type


Commit: 0f7fa00c9b2e6a50a3b871c3af5e67425002ea1f
    https://github.com/scummvm/scummvm/commit/0f7fa00c9b2e6a50a3b871c3af5e67425002ea1f
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-10-09T09:45:03+02:00

Commit Message:
BACKENDS: OPENGL: Fix parsing of scale_type

When scale_type was not specified, its default value was used for X and
Y instead of doing nothing

Changed paths:
    backends/graphics/opengl/pipelines/libretro/parser.cpp


diff --git a/backends/graphics/opengl/pipelines/libretro/parser.cpp b/backends/graphics/opengl/pipelines/libretro/parser.cpp
index 447ccdd520c..0f40b990cf7 100644
--- a/backends/graphics/opengl/pipelines/libretro/parser.cpp
+++ b/backends/graphics/opengl/pipelines/libretro/parser.cpp
@@ -410,10 +410,12 @@ bool PresetParser::parsePassScaleType(const uint id, const bool isLast, ShaderPa
 		return false;
 	}
 
-	if (!lookUpValue(passKey("scale_type"), &pass->scaleTypeX, defaultScaleType)) {
+	ScaleType scale_type;
+	// Small trick here: lookUpValue never returns kScaleTypeFull
+	if (!lookUpValue(passKey("scale_type"), &scale_type, kScaleTypeFull)) {
 		return false;
-	} else {
-		pass->scaleTypeY = pass->scaleTypeX;
+	} else if (scale_type != kScaleTypeFull) {
+		pass->scaleTypeY = pass->scaleTypeX = scale_type;
 	}
 
 	return true;




More information about the Scummvm-git-logs mailing list