Skip to content

1.12.0 - the Options screen comes back, and a stuck game can be closed

Choose a tag to compare

@phoenixd123 phoenixd123 released this 27 Nov 22:25
· 7 commits to main since this release

The game's Options screen comes back, and it can always be closed

Reported: opening the in-game Options screen left the picture dimmed with nothing responding, and the game could
not be closed without logging off Windows. Both halves are answered here.

The dimmed Options screen

The retail game builds that screen's resolution list from every display mode Windows reports, and tests each one
before the screen appears. A 2004 monitor had about sixteen; a modern driver reports 1100+, which is the
long-standing options-menu freeze the community fixes all patch out. In this port two host-layer answers were
missing instead: EnumDisplaySettingsA reported a single mode, and a mode change was acknowledged without the
WM_DISPLAYCHANGE a real one sends, which the screen waits for.

The port now gives the game sixteen modes - 4:3, 32-bit, 60 Hz, with the resolution it actually renders at first -
and answers a change with DISP_CHANGE_SUCCESSFUL plus WM_DISPLAYCHANGE. That is the state the 16-mode patch
forces the original executable into, without patching an executable.

Closing it

Alt+F4 (or Alt+Q), and closing the window, now ask the game to quit; if it does not within two seconds the
port stops itself. Whatever screen it is stuck on, there is a way out.

Also in this build

  • Alt+Enter switches fullscreen and a window, and Options > Window (fullscreen=1/0) sets what it starts
    in. Fullscreen is a borderless desktop window, so the desktop mode never changes. Before, the window was
    1280x720 whatever resolution= said, which quietly scaled 1080p back down into 720p.
  • The Windows Options screen fits again. Its rows reached y=806 on a 720 px canvas, so Install a mod and Back
    were drawn off-screen and could not be seen even while selected.
  • The launcher's hints name the keys that work - Enter: select, Esc: back - instead of the pad's A and B, and
    the warning screen says "Press Enter or A". Keyboard and pad both still work.

What was tested

  • build/modes_test.c: sixteen modes, the current one first, no repeats, 4:3/32-bit/60 Hz, the DEVMODE written and
    read back, bad sizes refused - all pass.
  • build/wcheck.sh: 26 translation units compile and the launcher links.
  • The launcher itself, driven by scripted keys: fullscreen=0 logged window: windowed at start; the new Window
    row switched it to fullscreen live and wrote fullscreen=1 to sh3.ini without touching resolution=.

Not tested: the game itself. There are no game files here, so the Options screen returning is verified in the host
layer - the mode list the game is given and the message it waits for - not on screen. If it still hangs, the log
with log=1 in sh3.ini will say what the game asked for right before it stopped.