FunkyFr3sh / cnc-ddraw

GDI, OpenGL and Direct3D 9 re-implementation of the DirectDraw API for classic 2D games for better compatibility with Windows 2000, XP, Vista, 7, 8, 10, 11, Wine (Linux/macOS/Android) and Virtual Machines
https://discord.gg/afWXJNDDF5
MIT License
2.12k stars 143 forks source link

I got the game working on LINUX!!! Now How do i Fix this Issue? #283

Closed genestrashcan closed 5 months ago

genestrashcan commented 5 months ago

I got the game working on linux using the bottles software (a better emulator than wine)

how do i fix this (the thing outlined in the image by the red square) so the sub menus show up completely in full screen mode?

ra2screentear

FunkyFr3sh commented 5 months ago

Something is upscaling the menus, which is not an easy task and it's probably the reason why it fails. Not sure if it's your ddraw.ini that's misconfigured or maybe your bottles software. Can you upload your ddraw.ini?

There are wine builds with something called "fullscreen hack" / "fshack", maybe that's it?

genestrashcan commented 5 months ago

Here's a copy of the ddraw.ini

; cnc-ddraw - https://github.com/CnCNet/cnc-ddraw - https://cncnet.org

[ddraw] ; ### Optional settings ### ; Use the following settings to adjust the look and feel to your liking

; Stretch to custom resolution, 0 = defaults to the size game requests width=0 height=0

; Override the width/height settings shown above and always stretch to fullscreen ; Note: Can be combined with 'windowed=true' to get windowed-fullscreen aka borderless mode fullscreen=false

; Run in windowed mode rather than going fullscreen windowed=false

; Maintain aspect ratio - (Requires 'handlemouse=true') maintas=false

; Windowboxing / Integer Scaling - (Requires 'handlemouse=true') boxing=false

; Real rendering rate, -1 = screen rate, 0 = unlimited, n = cap ; Note: Does not have an impact on the game speed, to limit your game speed use 'maxgameticks=' maxfps=0

; Vertical synchronization, enable if you get tearing - (Requires 'renderer=auto/opengl/direct3d9') ; Note: vsync=true can fix tearing but it will cause input lag vsync=false

; Automatic mouse sensitivity scaling - (Requires 'handlemouse=true') ; Note: Only works if stretching is enabled. Sensitivity will be adjusted according to the size of the window adjmouse=false

; Preliminary libretro shader support - (Requires 'renderer=opengl') https://github.com/libretro/glsl-shaders ; 2x scaling example: https://imgur.com/a/kxsM1oY - 4x scaling example: https://imgur.com/a/wjrhpFV shader=Shaders\sharpen\fast-sharpen.glsl

; Window position, -32000 = center to screen posX=-32000 posY=-32000

; Renderer, possible values: auto, opengl, gdi, direct3d9 (auto = try direct3d9/opengl, fallback = gdi) renderer=opengl

; Developer mode (don't lock the cursor) devmode=false

; Show window borders in windowed mode border=true

; Save window position/size/state on game exit and restore it automatically on next game start ; Possible values: 0 = disabled, 1 = save to global 'ddraw' section, 2 = save to game specific section savesettings=1

; Should the window be resizeable by the user in windowed mode? resizeable=true

; Enable C&C video resize hack - Stretches C&C cutscenes to fullscreen vhack=true

; Enable linear (D3DTEXF_LINEAR) upscaling filter for the direct3d9 renderer (16 bit color depth games only) d3d9linear=true

; ### Compatibility settings ### ; Use the following settings in case there are any issues with the game

; Hide WM_ACTIVATEAPP and WM_NCACTIVATE messages to prevent problems on alt+tab noactivateapp=false

; Max game ticks per second, possible values: -1 = disabled, 0 = emulate 60hz vblank, 1-1000 = custom game speed ; Note: Can be used to slow down a too fast running game, fix flickering or too fast animations ; Note: Usually one of the following values will work: 60 / 30 / 25 / 20 / 15 (lower value = slower game speed) maxgameticks=0

; Gives cnc-ddraw full control over the mouse cursor (required for adjmouse/boxing/maintas) ; Note: Set this to 'false' if your cursor becomes invisible at some places in the game handlemouse=true

; Windows API Hooking, Possible values: 0 = disabled, 1 = IAT Hooking, 2 = Microsoft Detours, 3 = IAT+Detours Hooking (All Modules), 4 = IAT Hooking (All Modules) ; Note: Change this value if windowed mode or upscaling isn't working properly ; Note: 'hook=2' will usually work for problematic games, but 'hook=2' must be combined with renderer=gdi hook=4

; Force minimum FPS, possible values: 0 = disabled, -1 = use 'maxfps=' value, 1-1000 = custom FPS ; Note: Set this to a low value such as 5 or 10 if some parts of the game are not being displayed (e.g. menus or loading screens) minfps=0

; Disable fullscreen-exclusive mode for the direct3d9/opengl renderers ; Note: Can be used in case some GUI elements like buttons/textboxes/videos/etc.. are invisible nonexclusive=false

; Force CPU0 affinity, avoids crashes/freezing, might have a performance impact singlecpu=true

; ### Game specific settings ### ; The following settings override all settings shown above, section name = executable name

; Command & Conquer: Red Alert - CnCNet [ra95-spawn] maxfps=125

; Command & Conquer Gold - CnCNet [cnc95] maxfps=125

; Carmageddon [CARMA95] renderer=opengl noactivateapp=true maxgameticks=60

; Carmageddon [CARM95] renderer=opengl noactivateapp=true maxgameticks=60

; Command & Conquer Gold [C&C95] maxgameticks=120 maxfps=60 minfps=-1

; Command & Conquer: Red Alert [ra95] maxgameticks=120 maxfps=60 minfps=-1

; Command & Conquer: Red Alert [ra95p] maxfps=60 minfps=-1

; Age of Empires [empires] handlemouse=false

; Age of Empires: The Rise of Rome [empiresx] handlemouse=false

; Age of Empires II [EMPIRES2] handlemouse=false

; Age of Empires II: The Conquerors [age2_x1] handlemouse=false

; Outlaws [olwin] noactivateapp=true maxgameticks=60 handlemouse=false renderer=gdi

; Dark Reign: The Future of War [DKReign] maxgameticks=60

; Star Wars: Galactic Battlegrounds [battlegrounds] handlemouse=false

; Star Wars: Galactic Battlegrounds: Clone Campaigns [battlegrounds_x1] handlemouse=false

; Carmageddon 2 [Carma2_SW] renderer=opengl noactivateapp=true maxgameticks=60

; Atomic Bomberman [BM] maxgameticks=60

; Dune 2000 [dune2000] maxfps=59 accuratetimers=true

; Dune 2000 - CnCNet [dune2000-spawn] maxfps=59 accuratetimers=true

; Command & Conquer: Tiberian Sun / Command & Conquer: Red Alert 2 [game] checkfile=.\blowfish.dll noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Tiberian Sun Demo [SUN] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Tiberian Sun - CnCNet [ts-spawn] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Red Alert 2 - XWIS [ra2] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Red Alert 2 - XWIS [Red Alert 2] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Red Alert 2: Yuri's Revenge [gamemd] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Red Alert 2: Yuri's Revenge - ?ModExe? [ra2md] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Red Alert 2: Yuri's Revenge - CnCNet [gamemd-spawn] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Command & Conquer: Red Alert 2: Yuri's Revenge - XWIS [Yuri's Revenge] noactivateapp=true handlemouse=false maxfps=60 minfps=-1

; Twisted Metal [TWISTED] renderer=opengl nonexclusive=true maxgameticks=25 minfps=5

; Twisted Metal 2 [Tm2] renderer=opengl nonexclusive=true maxgameticks=60 handlemouse=false fixchildwindows=false

; Caesar III [c3] handlemouse=false sierrahack=true

; Pharaoh [Pharaoh] handlemouse=false sierrahack=true

; Master of Olympus - Zeus [Zeus] handlemouse=false sierrahack=true renderer=gdi hook=2

; Dungeon Keeper 2 [DKII] maxgameticks=60 noactivateapp=true dk2hack=true

; Chris Sawyer's Locomotion [LOCO] handlemouse=false

; Age of Wonders [AoWSM] windowed=true fullscreen=false renderer=gdi hook=2

; Age of Wonders 2 [AoW2] windowed=true fullscreen=false renderer=gdi hook=2

; Stronghold Crusader HD [Stronghold Crusader] handlemouse=false

; Stronghold Crusader Extreme HD [Stronghold_Crusader_Extreme] handlemouse=false

FunkyFr3sh commented 5 months ago

That's a very old ddraw.ini you got there, possibly a couple years old. Maybe try to upgrade to the latest cnc-ddraw version. Don't mix old ddraw.ini's with new ddraw.dll's BTW.

But it looks like upscaling is disabled, so I guess your issue might be the wine build that's used in bottles

genestrashcan commented 5 months ago

When ever i select the renderer in CNCNet it changes the ini to that older version.

I tried your newer version and it always causes the menu with no buttons to come up like in this image below

Screenshot_20240206_011049

FunkyFr3sh commented 5 months ago

Yeah, it's not going to work if you mix the files. I think it copies the files from the resources folder, so you'll have to update them in there to the latest cnc-ddraw version

genestrashcan commented 5 months ago

i think i solved the issue, i set bottles to use a the system wine version of winehq and now it seems to work properly.