VOGONS


First post, by TianQI233

User metadata
Rank Newbie
Rank
Newbie

Bug: Window shifted down in fake fullscreen on non-integer DPI scaling (16:10 display)
Hi Dege,
I found a window positioning bug with dgVoodoo 2.86.4 D3D9 wrapper.
Environment:

Windows 11 24H2
Display: 2560×1600 (16:10)
DPI scaling: 150%
Game: Touhou 16 (Hidden Star in Four Seasons), native D3D9, using thcrap launcher

Symptom:
In fake fullscreen mode, the entire game image is shifted downward by ~30-40px. The bottom of the game is clipped below the screen edge, and the top portion appears vertically stretched to fill the gap — as if the client area is being rendered at an offset and the display output is scaled to compensate.
Reproduction:

2560×1600 @ 150% → bug occurs
2560×1600 @ 200% → no issue (DPI virtualization masks it)

Hint on location:
The issue seems to be in the windowed-mode window creation path. When the window is created with WS_CAPTION style, AdjustWindowRect expands the rect to include the title bar. The centering logic then computes a negative top coordinate to hide it above the screen. But there is a clipping check that detects the window extends above the monitor top and calls OffsetRect to push it back down — this defeats the purpose of the negative offset and shifts the client area down by the title bar height.
On 200% scaling, Windows DPI virtualization reports a smaller virtual resolution so the offset is small enough to go unnoticed. On 150% (non-integer), the wrapper operates closer to physical coordinates and the shift becomes clearly visible.
Thanks for the amazing work on dgVoodoo!

Reply 1 of 1, by Dege

User metadata
Rank l33t
Rank
l33t

Hi,

I tried (hopefully) this game in 2560x1440 but I only get this options at startup:

Kepernyokep-2026-02-17-193906.png

So I choose 960 x 720 to precisely upscale it to 1440p.
No matter what DPI scaling I'm using I always get this, even with native D3D9:

Tohou16.png

A part from the right and the bottom of the image is missing. Or maybe not because when I run the game in windowed mode (the first checkbox in the game options window) then the window content is the same as in fullscreen:

Kepernyokep-2026-02-17-195041.png

Also, fake fullscreen does not affect this behavior for me.