#15521 closed defect (fixed)
ENGINES: Some graphics settings for 2D games are ignored
Reported by: | criezy | Owned by: | bluegr |
---|---|---|---|
Priority: | blocker | Component: | Graphics |
Version: | Keywords: | ||
Cc: | Game: |
Description
The pull request ENGINES: Use common GFX code for 3D games that was merged two days ago introduces a regression with all 2D games. Now filtering, scaler, and shader set in the game options are ignored.
This happens because g_system->hasFeature(OSystem::kFeatureOpenGLForGame)
, that is now checked in initCommonGFX()
to skip some settings for 3D games, is actually always true with the SDL, Android, and iOS backends, even for 2D games. It indicates that the backend supports hardware-accelerated 3D games, not that the current one is such a game.
See https://github.com/scummvm/scummvm/blob/master/backends/platform/sdl/sdl.cpp#L200-L205
So those settings are now skipped for 2D game as well.
I don't know how to properly test if a 3D game is running though. Maybe getFeatureState(OSystem::kFeatureOpenGLForGame) should return true for OpenGLSdlGraphics3dManager, iOSGraphics3dManager, and AndroidGraphics3dManager, which does not seem to be the case currently, and then here we could use getFeatureState() instead of hasFeature().
Change History (3)
comment:1 by , 4 months ago
comment:2 by , 4 months ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
You are right that we can't rely on kFeatureOpenGLForGame for 3D games. Sorry for that!
I've added a parameter to initCommonGFX(), so now callers will need to specify if they're using 3D graphics. I didn't want to make more invasive changes - I believe that this flag will do for the time being, although we may need to revisit it in the future, as you suggested.
In ac06a27c: