Opened 5 days ago

Last modified 5 days ago

#11076 new defect

BACKENDS: Aspect ratio correction doesn't work with SDL1 or SDL2 modes in Dreamweb

Reported by: rsn8887 Owned by:
Priority: normal Component: Graphics
Keywords: aspect correction SDL Cc:
Game: Dreamweb

Description

Reproduce: Boot up ScummVM latest nightly OSX, or Switch (probably same problem on other SDL1 and SDL2 platforms). If applicable, change graphics mode from OpenGL to 2x or 1x. Enable aspect correction. Observe that the main ScummVM menu shows aspect correction. Boot up Dreamweb. Observe no aspect correction in game.

For comparison, try OpenGL rendering and observe working aspect correction in Dreamweb.

Change History (2)

comment:1 Changed 5 days ago by rsn8887

Summary: Aspect ratio correction doesn't work with SDL1 or SDL2 modes in DreamwebBACKENDS: Aspect ratio correction doesn't work with SDL1 or SDL2 modes in Dreamweb

comment:2 Changed 5 days ago by criezy

That is an interesting one. I can indeed confirm that with the SDL graphics modes when the aspect ratio is on in the Launcher, it is turned off when starting Dreamweb. And indeed with the OpenGL graphics mode this does not happen (as expected the aspect ratio correction remains on).

This is related to the game using mostly 320x200 resolution, but having a few places where it uses a resolution of 640x480 (one of which being the bible quote in the intro). The SurfaceSdlGraphicsManager resets its aspect ratio flag to false when it is set to a resolution that should not be corrected, such as when it gets to the bible quote screen in the intro. Then when it switches back to 320x200, it is not turned back on.

Whenever an engine calls initGraphics(), for example when it starts, and whenever it switches resolution, it calls initCommonGFX() that resets the graphics settings from the config. But that function assumes that the global settings are already set (which they are when we start the game) and only sets the options specific to the engine (if you overwrote graphic options in the game settings).

That means that there is actually a couple of ways where the game will start with aspect ratio correction on:

  • If you edit the settings from Dreamweb and override the graphics setting to use aspect ratio.
  • If you load an existing game (as the intro is not played).

We might be able to work around the issue by changing initCommonGFX to not just look at the game domain in the config manager. But in my opinion the root cause is an issue with the way the SurfaceSdlGraphicsManager manages its aspect ratio flag, and the better solution would be to fix that. I will try to take a look this weekend, but if anybody else wants to take a stab at this, you are more than welcome.

Note 1: You can also change the aspect ratio back using Ctrl+Alt+a after starting the game.

Note 2: In theory we should actually not apply the aspect ratio correction to this game as it was designed with square pixels in mind (see the circle in the intro and the fan in Eden's room at the start o the game). So I am almost tempted to write that this bug is actually a feature :-P

Note: See TracTickets for help on using tickets.