[Scummvm-git-logs] scummvm master -> 8901a404f2b10d938d155a619769c810fb4a3fc8

grisenti noreply at scummvm.org
Fri Jul 18 20:29:52 UTC 2025


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

Summary:
8901a404f2 HPL1: update shader and opengl detection code


Commit: 8901a404f2b10d938d155a619769c810fb4a3fc8
    https://github.com/scummvm/scummvm/commit/8901a404f2b10d938d155a619769c810fb4a3fc8
Author: grisenti (emanuele at grisenti.net)
Date: 2025-07-18T22:29:25+02:00

Commit Message:
HPL1: update shader and opengl detection code

Changed paths:
    engines/hpl1/graphics.cpp


diff --git a/engines/hpl1/graphics.cpp b/engines/hpl1/graphics.cpp
index d5e8be01623..dbc4e4a46de 100644
--- a/engines/hpl1/graphics.cpp
+++ b/engines/hpl1/graphics.cpp
@@ -21,33 +21,34 @@
 
 #include "hpl1/graphics.h"
 
-#include "common/config-manager.h"
-#include "graphics/opengl/context.h"
+#include "graphics/renderer.h"
 #include "graphics/surface.h"
 #include "hpl1/opengl.h"
 
 namespace Hpl1 {
 
 bool areShadersAvailable() {
-#ifdef USE_OPENGL
-	return useOpenGL() && OpenGLContext.enginesShadersSupported &&
-		   (!ConfMan.hasKey("renderer") || ConfMan.get("renderer") == "opengl_shaders");
-#endif
+#if defined(USE_OPENGL_SHADERS)
+	return Graphics::Renderer::getAvailableTypes() & Graphics::kRendererTypeOpenGLShaders;
+#elif
 	return false;
+#endif
 }
 
 Common::ScopedPtr<Graphics::Surface> createViewportScreenshot() {
 #ifdef USE_OPENGL
 	return createGLViewportScreenshot();
-#endif
+#elif
 	return nullptr;
+#endif
 }
 
 bool useOpenGL() {
-#ifdef USE_OPENGL
-	return (!ConfMan.hasKey("renderer") || ConfMan.get("renderer").contains("opengl"));
-#endif
+#if defined(USE_OPENGL) || defined(USE_OPENGL_GAME)
+	return Graphics::Renderer::getAvailableTypes() & (Graphics::kRendererTypeOpenGLShaders | Graphics::kRendererTypeOpenGL);
+#elif
 	return false;
+#endif
 }
 
 } // namespace Hpl1
\ No newline at end of file




More information about the Scummvm-git-logs mailing list