[Scummvm-git-logs] scummvm master -> f88381f0d19cea9a8d729b067f05b4d037e5b50f

criezy criezy at scummvm.org
Tue Dec 29 23:24:07 UTC 2020


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:
f88381f0d1 GUI: Apply default shader when selected


Commit: f88381f0d19cea9a8d729b067f05b4d037e5b50f
    https://github.com/scummvm/scummvm/commit/f88381f0d19cea9a8d729b067f05b4d037e5b50f
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2020-12-29T23:22:42Z

Commit Message:
GUI: Apply default shader when selected

Changed paths:
    gui/options.cpp


diff --git a/gui/options.cpp b/gui/options.cpp
index d568ac2885..ca78c7152a 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -623,8 +623,11 @@ void OptionsDialog::apply() {
 					sm++;
 				}
 			}
-			if (!isSet)
+			if (!isSet) {
 				ConfMan.removeKey("shader", _domain);
+				if (g_system->getShader() != g_system->getDefaultShader())
+					graphicsModeChanged = true;
+			}
 		} else {
 			ConfMan.removeKey("shader", _domain);
 		}
@@ -642,8 +645,8 @@ void OptionsDialog::apply() {
 			g_system->setFeatureState(OSystem::kFeatureFullscreenMode, ConfMan.getBool("fullscreen", _domain));
 		if (ConfMan.hasKey("filtering"))
 			g_system->setFeatureState(OSystem::kFeatureFilteringMode, ConfMan.getBool("filtering", _domain));
-		if (ConfMan.hasKey("shader"))
-			g_system->setShader(ConfMan.get("shader", _domain).c_str());
+
+		g_system->setShader(ConfMan.get("shader", _domain).c_str());
 
 		OSystem::TransactionError gfxError = g_system->endGFXTransaction();
 




More information about the Scummvm-git-logs mailing list