narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
952 stars 70 forks source link

Steam shortcut error - double click on the main exe OK #68

Closed donizettilorenzo closed 3 years ago

donizettilorenzo commented 4 years ago

Lastest binaries of ddrawcompat Unreal Gold from Steam (NO other patches)

If I launch it through the shortcut/Steam library "Play" button -> CRASH with no particolar log: Warning: glxStopOutput() failed: 6 Exit: Executing UWindowsClient::ShutdownAfterError Exit: UD3DRenderDevice::ShutdownAfterError Exit: appExit Uninitialized: Name subsystem shut down Uninitialized: Log file closed, 05/21/20 14:46:52

If I launch it through the main exe (Steam being active) Unreal.exe -> Allright

narzoul commented 4 years ago

What does the log of DDrawCompat say? Does the game work without it?

donizettilorenzo commented 4 years ago

The game works without it (but in the expected classic 60 FPS locked manner) No particular information in DDrawCompat log!

donizettilorenzo commented 4 years ago

Here's the log

_1f04 16:04:43.673 Process path: E:\Steam Games\steamapps\common\Unreal Gold\system\Unreal.exe 1f04 16:04:43.673 Environment variable __COMPAT_LAYER = "" 1f04 16:04:43.673 Loading DDrawCompat dynamically from E:\Steam Games\steamapps\common\Unreal Gold\system\ddraw.dll 1f04 16:04:43.677 DDrawCompat loaded successfully 1f04 16:04:43.677 Installing display mode hooks 1f04 16:04:43.684 Installing registry hooks 1f04 16:04:43.684 Installing Direct3D driver hooks 1f04 16:04:43.685 Installing Win32 hooks 1f04 16:04:43.773 Hooking user mode display driver: C:\WINDOWS\System32\DriverStore\FileRepository\iigd_dch.inf_amd64cbd42a415845f91a\igdumdim32.dll 1f04 16:04:43.805 Installing DirectDraw hooks 1f04 16:04:43.808 Installing Direct3D hooks 1f04 16:04:43.826 Installing GDI hooks 1f04 16:04:43.947 Finished installing hooks 1f04 16:04:48.092 Detaching DDrawCompat due to process termination 1f04 16:04:48.093 DDrawCompat detached successfully

narzoul commented 4 years ago

Indeed, nothing suspicious there. Please upload the debug logs produced by the ReleaseWithDebugLogs build (in ddraw-debug.zip).

donizettilorenzo commented 4 years ago

With "release with debug logs" the rendering is passed to the Unreal Engine Software Renderer......(launching with the Steam Shortcut). Here's the log: DDrawCompat-Unreal.zip

narzoul commented 4 years ago

Thanks! I don't have the Steam version of the game, but I have the GOG version, and I managed to reproduce the problem by importing that to my Steam library and running the game through the Steam client. Now I have the same issue as you, it fails with 80070057 (E_INVALIDARG) when trying to change display mode (IDirectDrawVtbl::SetDisplayMode in the logs).

I think it must be some kind of interference from GameOverlayRenderer.dll that Steam injects for its overlay to work. Unfortunately, it seems that even disabling the overlay from settings will not disable this injection. I actually found that it writes some logs too in GameOverlayRenderer.log, next to the dll file (in C:\Program Files (x86)\Steam by default), which shows that it hooks DirectDraw also.

With multiple hooks from different sources, there can always be conflicts like this. There are similar issues reported already for some video capture tools (see issue #13). I'll try to fix these if I can, but it's currently not at the top of my priority list, so it might take a while longer...

narzoul commented 3 years ago

Should be fixed in v0.3.0.

pas-de-2 commented 1 year ago

Steam overlay still seems to cause crashes with the GOG versions of Age of Wonders I/II/Shadow Magic when launched in a fullscreen mode. Here's a debug log from AoW2: DDrawCompat-AoW2.log

Desperados launches fine, so I think it's something specific to this engine.

Steam doesn't provide an option to disable the overlay on a per-game basis for non-Steam games, so my workaround is to just create a .bat file that launches the game exe and point the Steam shortcut at that.