Opened 5 years ago

Last modified 3 years ago

#11076 new defect

BACKENDS: SDL1/2 - Aspect ratio correction doesn't work in Dreamweb

Reported by: rsn8887 Owned by:
Priority: normal Component: Graphics
Version: 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 (6)

comment:1 by rsn8887, 5 years ago

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 by criezy, 5 years ago

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

comment:3 by raziel-, 4 years ago

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

comment:4 by sev-, 4 years ago

Priority: normalhigh

comment:5 by rsn8887, 4 years ago

Switching between the scaling modes "Fit to Window (4:3)", or "Fit to Window" allows users to change the aspect ratio in this game. I think maybe that is already enough?

comment:6 by sev-, 3 years ago

Priority: highnormal
Note: See TracTickets for help on using tickets.