From 9cf5ebecdfd2801518483da13321fe3b9035f087 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sun, 5 Mar 2017 00:43:49 +0100 Subject: BACKENDS: Fix crash on startup --- backends/graphics/surfacesdl/surfacesdl-graphics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp index 4eb63fd303..2b31e90352 100644 --- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp +++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp @@ -200,11 +200,13 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou _videoMode.filtering = ConfMan.getBool("filtering"); #endif - if (g_system->hasFeature(OSystem::kFeatureShader)) { + // Default backend does not have shaders. Disable check. + // TODO: Implement more elegant way. + if (0 && g_system->hasFeature(OSystem::kFeatureShader)) { // shader number 0 is the entry NONE (no shader) const OSystem::GraphicsMode *p = s_supportedShaders; _numShaders = 0; - while (p->name) { + while (p->name) { _numShaders++; p++; } -- cgit v1.2.3