aboutsummaryrefslogtreecommitdiff
path: root/backends/graphics/surfacesdl
diff options
context:
space:
mode:
authorrsn88872017-03-06 08:57:21 -0600
committerGitHub2017-03-06 08:57:21 -0600
commit44de995bb6eb57633aec4bd558973163ecaaa780 (patch)
treed53da48a1b139c3755a1cdc47cc49fd879935d2a /backends/graphics/surfacesdl
parent7f2ddf8a13c344195b5d33a4b2e785ffca5b615f (diff)
downloadscummvm-rg350-44de995bb6eb57633aec4bd558973163ecaaa780.tar.gz
scummvm-rg350-44de995bb6eb57633aec4bd558973163ecaaa780.tar.bz2
scummvm-rg350-44de995bb6eb57633aec4bd558973163ecaaa780.zip
SDL: Fix trying to init non-supported shaders (#917)
Diffstat (limited to 'backends/graphics/surfacesdl')
-rw-r--r--backends/graphics/surfacesdl/surfacesdl-graphics.cpp24
1 files changed, 6 insertions, 18 deletions
diff --git a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
index 692602bf07..690e9a360e 100644
--- a/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
+++ b/backends/graphics/surfacesdl/surfacesdl-graphics.cpp
@@ -200,24 +200,12 @@ SurfaceSdlGraphicsManager::SurfaceSdlGraphicsManager(SdlEventSource *sdlEventSou
_videoMode.filtering = ConfMan.getBool("filtering");
#endif
- // 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) {
- _numShaders++;
- p++;
- }
- _currentShader = ConfMan.getInt("shader");
- if (_currentShader < 0 || _currentShader >= _numShaders) {
- _currentShader = 0;
- }
- } else {
- _numShaders = 1;
- _currentShader = 0;
- }
+ // the default backend has no shaders
+ // shader number 0 is the entry NONE (no shader)
+ // for an example on shader support,
+ // consult the psp2sdl backend which inherits from this class
+ _currentShader = 0;
+ _numShaders = 1;
}
SurfaceSdlGraphicsManager::~SurfaceSdlGraphicsManager() {