mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-02 06:40:42 -07:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user