Opened 2 years ago

Last modified 2 years ago

#13073 new defect

BACKENDS: SDL: Strange initSizeHint() behavior — at Version 1

Reported by: eriktorbjorn Owned by:
Priority: normal Component: Graphics
Version: Keywords:
Cc: Game: Zork Nemesis

Description (last modified by eriktorbjorn)

I have the current setup:

I'm using the "SDL Surface" graphics mode with the Normal 4x scaler. This means the launcher opens at a resolution of 1280x800 pixels.

Since I haven't specified scale factor for any other games, they try to open at as close as possible to 1280x800. E.g. The Secret of Monkey Island (320x200) starts at 1280x800, FM-Towns Loom (320x240) at 1280x960, Touché (640x400) at 1280x800, Curse of Monkey Island (640x480) at 1280x960, etc.

Basically, most games will start in either Normal 4x or 2x mode.

But the ZVision engine uses initGraphicsModes(), which calls initSizeHint(), to support different resolutions.

Zork Nemesis has a native resolution of 640x480, and that's what _hintedHeight and _hintedWidth are set to. So even though ScummVM thinks the game is running with a Normal 2x scaler, the window it creates is 640x480 pixels. (This also affects the look of the ScummVM GUI if you press Ctrl+F5.)

This does not feel like the intended behavior, but I don't understand the purpose of _hintedHeight and _hintedWidth so I don't dare messing with it.

If I explicitly set Zork Nemesis to use a 2x scaler, the hinted dimensions are set to 2560x1920 pixels, which is larger than my screen.

Change History (1)

comment:1 by eriktorbjorn, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.