Skip to content

feat(vk): add Display mode and Screen selectors to Graphics menu - #116

Open
meansabine wants to merge 1 commit into
Sacrappy:mainfrom
meansabine:feat/display-mode-selector
Open

meansabine wants to merge 1 commit into
Sacrappy:mainfrom
meansabine:feat/display-mode-selector

Conversation

@meansabine

@meansabine meansabine commented Nov 21, 2026 •

Copy link
Copy Markdown

Players with multiple monitors or who want explicit control over Windowed, Borderless, and independent-flip Fullscreen could previously only toggle Fullscreen on or off on the current display. This replaces the Fullscreen toggle with a 3-way Display mode selector and adds a Screen (monitor) selector in the F1/Insert Graphics tab, saving both choices across restarts in hookshot_options.ini.

What changed

  • Display mode (Windowed / Borderless / Fullscreen) in engine/gpu/vk/vk_menu.cpp, engine/gpu/vk/vk_menu.h, engine/host/display.c, engine/host/posix/display_sdl.c, and engine/host/hos_sdl.c:
    • 0 = Windowed (WS_OVERLAPPEDWINDOW), 1 = Borderless (borderless over the monitor; WS_POPUP only when VRR asks for it), 2 = Fullscreen (WS_POPUP + SWP_SHOWWINDOW for independent flip on Windows; SDL_WINDOW_FULLSCREEN under SDL2).
    • Keeps the fullscreen= key in hookshot_options.ini (0, 1, 2) for backward compatibility with existing configs and recomplauncher.json, and keeps F11 / Alt+Enter in sync.
  • Screen (monitor) selector (Auto, or 1..N by monitor name and resolution):
    • Enumerates connected displays via EnumDisplayMonitors / EnumDisplayDevicesW on Windows and SDL display APIs (hos_posix_display_count / hos_posix_display_name) on Linux, saved as screen= in hookshot_options.ini.
    • Applies immediately via WM_APP + 11 and on startup before fullscreen_tick().
  • Docs & tests: Updated recomplauncher.json, engine/readme.md, docs/SWITCHES.md, engine/docs/switches.json, tests/test_present_mode.py, tests/test_recomplauncher_json.py, tests/screensaver_test.c, and added engine/tests/test_display_mode.py.

Testing

  • Windows (in-game): Built locally via HeyListenBuilder and tested in-game on Windows.
  • Linux: Untested on Linux (SDL2/SDL3 monitor selection and display mode paths were checked by source/static checks only).
  • Game-free checks (Windows, llvm-mingw clang/clang++): test_display_mode.py, test_present_mode.py, test_menu_rows.py, test_screensaver.py, test_alt_enter.py, test_menu_hit.py, test_menu_restart.py, test_windows_display_startup.py, test_update_offer.py, test_host_exports.py, test_utf8_paths.py, test_recomplauncher_json.py, and test_switches_documented.py all passed.

Assisted-by: Antigravity

Replaces the Fullscreen toggle with a 3-way Display mode selector (Windowed, Borderless, Fullscreen) and adds a Screen (monitor) selector, both saved in hookshot_options.ini (fullscreen= and screen=).

Assisted-by: Antigravity
@Sacrappy

Copy link
Copy Markdown
Owner

Thanks for this! It touches the Windows display path, so I'll read the whole diff and test the three modes and the screen selector in game before merging. That will come after the performance work currently running, so it may take a day or two.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants