Repository navigation
Commit 25350a2
fix: verify the window's real client rect before trusting size-to-window
The previous commit treated any Width==0 && Height==0 descriptor with a non-null
OutputWindow as "size to window" and wrapped it as if it were the game's real
swapchain. That's not quite safe: a helper/overlay swapchain (Steam, Discord,
NVIDIA overlay, etc.) could use this exact same 0x0 idiom against its own
tiny/hidden window, and would now get misclassified as the real swapchain instead
of correctly falling through to the existing "Overlay call!" path.
Check GetClientRect() on OutputWindow instead of just checking the pointer is
non-null: a hidden helper window resolves to a tiny or zero client rect, while a
game's actual window won't. Only treat the descriptor as size-to-window when the
window itself is at least 100x100.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent f1b9fec commit 25350a2
1 file changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
285 | 285 | | |
286 | 286 | | |
287 | 287 | | |
288 | | - | |
289 | | - | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
290 | 304 | | |
291 | 305 | | |
292 | 306 | | |
| |||
0 commit comments