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.13k stars 143 forks source link

Desperados: Wanted Dead or Alive locks up when alt tabbing in menus and videos #278

Closed pas-de-2 closed 5 months ago

pas-de-2 commented 5 months ago

This game locks up for me if I ever tab out while in the main menu, or if the escape key menu is visible, or during a cinematic. It alt tabs fine during unpaused gameplay, though. I tried switching to fullscreen, different renderers, alt tab fix, and disabling vsync/frame limiter as potential fixes and nothing helped.

Log: cnc-ddraw-1.zip

FunkyFr3sh commented 5 months ago

Hm yeah, that might be difficult to fix. The game detects when you press Alt+Tab via DirectInput and tries to interfere. Only thing that helps is setting "allow_wmactivate=true" and then minimize+restore the window (must be in windowed mode) to re-enable the renderer.

Not sure if it's worth it spending a lot time with this game because there is a updated version of it that doesn't use DirectDraw anymore and it wouldn't have that issue. A possible fix for this game wouldn't help any other game since it's very specific to this game engine

pas-de-2 commented 5 months ago

I checked Robin Hood: The Legend of Sherwood (same dev/engine) and it has this issue, too. But it's okay, I tried DDrawCompat and that works well enough for these games.

FunkyFr3sh commented 5 months ago

Ah, didn't know there was another game, will have a look into Robin Hood: The Legend of Sherwood.

Just noticed that it does actually work fine in Fullscreen and Fullscreen Upscaled as long as the Alt+Tab fix is disabled. So it only affects windowed+borderless

pas-de-2 commented 5 months ago

Hmm, fwiw the game still locks up for me in fullscreen/fullscreen upscaled with or without alt tab fix.

cnc-ddraw-1.zip

FunkyFr3sh commented 5 months ago

Alt+Tab fix is on in your log, but I assume the issue could be that I tested on OpenGL and you're on Direct3D9 (auto)

pas-de-2 commented 5 months ago

You're right, switching to fullscreen OpenGL fixes the alt tabbing. Though it's a bit janky in Robin Hood, I have to alt tab twice to get it to work properly--tabbing back in the first time just shows my desktop at 640x480.

FunkyFr3sh commented 1 month ago

I just made Robin Hood - The Legend of Sherwood working, but I've done it with game patches. Could backport it to Desperados too if needed

Robin Hood - The Legend of Sherwood.zip

pas-de-2 commented 1 month ago

Alt tabbing works well. Only issue I notice now is that the opening movie playback is very stuttery.

FunkyFr3sh commented 1 month ago

Yeah, you're right. This setting here does fix it though:

image

Will have to add a preset for the game