gitadora: more windowed mode fixes (#819)

## Link to GitHub Issue or related Pull Request, if one exists
User reported

## Description of change

Sometimes the game moved the main window after `CreateWindowExA`
returned but before D3D initialization called
`graphics_capture_initial_window`. During this gap,
`GRAPHICS_HOOKED_WINDOW` was not set, so the placement hooks could not
identify the main window and preserve its monitor override. GITADORA
main, LEFT, and RIGHT windows are now registered immediately after
creation so later placement calls cannot undo their overrides.

This also adds `-gdwsmallsize` and `-gdwsmallpos` for explicitly setting
the SMALL window size and position. Explicit values override the
corresponding monitor-derived geometry, allowing the SMALL window's
10:16 aspect ratio to be preserved instead of stretching it to fill a
monitor.

## Testing
This commit is contained in:
bicarus
2026-07-21 00:54:09 -07:00
committed by GitHub
parent ed7318c270
commit 3f0921d983
6 changed files with 92 additions and 10 deletions
+3 -1
View File
@@ -88,6 +88,8 @@ extern std::string GRAPHICS_GITADORA_MAIN_MONITOR;
extern std::string GRAPHICS_GITADORA_LEFT_MONITOR;
extern std::string GRAPHICS_GITADORA_RIGHT_MONITOR;
extern std::string GRAPHICS_GITADORA_SMALL_MONITOR;
extern std::optional<std::string> GRAPHICS_GITADORA_SMALL_SIZE;
extern std::optional<std::string> GRAPHICS_GITADORA_SMALL_POS;
extern bool GRAPHICS_IIDX_WSUB;
extern std::optional<std::string> GRAPHICS_WSUB_SIZE;
@@ -157,7 +159,7 @@ bool graphics_gitadora_apply_window_monitor(
int &width,
int &height,
bool log_change);
bool graphics_gitadora_has_window_monitor(const std::string &window_name);
bool graphics_gitadora_has_window_override(const std::string &window_name);
void change_primary_monitor(const std::string &monitor_name);
void update_monitor_on_boot(