Repository navigation
Releases
v1.1.0 - Dropdown clicks
Fork of cnc-ddraw for Red Alert 2 and Yuri's Revenge, adding a menu input mode that keeps the upscaled menus clickable.
Fixed in this release
Dropdown list items did not respond to clicks. RA2 opens its own dropdown window (class ComboDropWin) and calls SetCapture on it. Mouse capture bypasses hit-testing, so Windows delivered click coordinates relative to the window's unscaled rectangle while the player clicked the upscaled artwork. The subclass procedure now recomputes those coordinates from the real cursor position whenever a child window holds capture.
Affects the keyboard customize screen (Category selector) and any other RA2 dropdown.
Already in v1.0.0
fixchilds=5, a menu input mode that forwards clicks to the unscaled dialog controls.- Campaign side emblems respond to clicks. RA2 hit-tests them through
ChildWindowFromPointEx; the hook retries a missed lookup with the point divided back into dialog space. - The invisible unscaled dialog no longer swallows clicks in the top left region. Its controls answer
WM_NCHITTESTwithHTTRANSPARENT. - Mouse offset corrected for borderless maximized windows.
- Multi-pass shader chains.
Install
Copy ddraw.dll next to game.exe, then set fixchilds=5 in the [game] section of ddraw.ini.
v1.0.0
A fork of cnc-ddraw built for Red Alert 2, Yuri's Revenge and Mental Omega. Not a general-purpose cnc-ddraw build — playing anything else, use upstream.
Install
Copy ddraw.dll, ddraw.ini and the Shaders folder into your game folder (the one with gamemd.exe / game.exe). fixchilds=5 is already set in the bundled ini. RA2Video.exe is optional.
Mental Omega: also set fixchilds=5 in Resources\cnc-ddraw.ini. The MO client copies that file over ddraw.ini every time you save settings.
What this fork adds
fixchilds=5 — menus stay clickable when upscaled. The reason this fork exists. RA2 and Yuri's Revenge draw their menus as real Win32 dialogs laid out in 800x600 units, so Windows hit-tests the buttons at those raw offsets however the renderer scales the picture: upscaling moves the art but leaves the click targets in the corner. Upstream handles this by giving up the upscale whenever a child window exists, which is the right call across the many games it supports. fixchilds=5 keeps the upscale and moves the input instead — the dialog is made transparent to hit-testing, clicks are remapped into dialog space and posted to the control actually under the cursor, and a CBT hook catches dialogs created after startup.
Stock cnc-ddraw ignores the value 5 and silently falls back to its default, so if your menus are misaligned you are not running this build.
Multi-pass shader chains. shader= accepts a pipe-separated list, up to 8 passes: shader=Shaders\xbrz\4xbrz.glsl|Shaders\sharpen\fast-sharpen.glsl. Upstream supports two. A single path behaves exactly as upstream.
Borderless maximized mouse offset. The OpenGL y-align hack added a row unconditionally, offsetting the cursor in borderless maximized windows that do not cover the screen. It now applies only when the render area really covers the display.
RA2Video.exe. A small renderer and resolution picker for ddraw.ini. The MO client's own video settings screen does not know fixchilds=5 exists and rewrites ddraw.ini when you use it; this one writes the [ddraw], [game], [gamemd], [ra2] and [ra2md] sections and leaves fixchilds alone. MO also resets non-standard resolutions to 800x600, so the picker offers only modes that survive that.
Screenshot on demand. WM_APP+120 makes the renderer grab a frame, so a script can take screenshots without touching the keyboard.
Credit
Nearly all of this code is FunkyFr3sh's — the fork is about 600 lines on top. MIT, LICENSE unchanged.
Pairs with ra2-hwcursor-wasd for a real hardware mouse cursor.
32-bit, built Release/Win32 with the VS 2022 v143 toolset. Not affiliated with or endorsed by EA.