Fix cnc-ddraw native DLL override at launch
Root cause
Selecting cnc-ddraw extracts its native ddraw.dll into the Wine prefix, but the launch environment only sets CNC_DDRAW_CONFIG_FILE. Without a ddraw native override, Wine continues loading its builtin DirectDraw DLL.
A Bookworm Deluxe support report reproduced this exactly: the applied config selected dxwrapper: cnc-ddraw and the launch env included CNC_DDRAW_CONFIG_FILE, while the game process logged Loaded L"C:\\windows\\system32\\ddraw.dll" ... builtin.
Fix
At app/src/main/java/app/gamenative/ui/screen/xserver/XServerScreen.kt:5674, merge ddraw=n,b into the effective WINEDLLOVERRIDES whenever cnc-ddraw is selected, preserving any existing overrides. This makes Wine load the extracted cnc-ddraw DLL first.
Verification
git diff --check passes. Repository builds were not run in the support workspace.
Summary by cubic
Fixes cnc-ddraw not being loaded at launch: the config file was set but Wine kept loading its builtin ddraw.dll because no native DLL override was applied.
Now, when cnc-ddraw is selected, ddraw=n,b is merged into the effective WINEDLLOVERRIDES, preserving any existing overrides so Wine loads the extracted cnc-ddraw DLL first.
Summary by CodeRabbit
- Bug Fixes
- Improved compatibility when using the
cnc-ddrawDX wrapper by preserving existing Wine DLL overrides while adding the requiredddrawoverride.
- Improved compatibility when using the