graphics: fix window resize not working properly in some games (#530)

## Link to GitHub Issue, if one exists
n/a

## Description of change
Need to filter out system-created windows (such as `CicMarshalWnd`) when
looking up which window to mess with when user interacts with F11 menu.

While I'm here, clean up the hack for gfdm arena model that remembers
the main window.

## Testing
Tested:

DDR
gfdm arena 4 / 1 window modes
iidx (windowed mode, with/without nosub option)
sdvx with sub windows

Need to check:
full screen games
This commit is contained in:
bicarus
2026-01-22 19:06:31 -08:00
committed by GitHub
parent cb59fe14e9
commit cd14ca800e
4 changed files with 35 additions and 24 deletions
@@ -27,11 +27,12 @@ namespace overlay::windows {
}
HWND ScreenResize::get_first_window() {
// hack for gitadora arena model which races to create many windows
// so [0] is not always the main one
if (GRAPHICS_WINDOW_MAIN.has_value()) {
return GRAPHICS_WINDOW_MAIN.value();
// this is ideal
if (GRAPHICS_HOOKED_WINDOW.has_value()) {
return GRAPHICS_HOOKED_WINDOW.value();
}
// we typically do not want to check GRAPHICS_WINDOWS because it may include
// system windows (e.g., CicMarshalWnd)
if (GRAPHICS_WINDOWS.size() == 0) {
return NULL;
}