narzoul / DDrawCompat

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

Deadlock 2 Shrim Wars is not working #142

Closed sniper8952 closed 2 years ago

sniper8952 commented 2 years ago

Hi narzoul

I bought Deadlock 2 Shrine Wars on Steam. On Windows 10 it worked with your solution. However, I have now installed Windows 11 on my PC and when I start the game I get the error message "DirectDraw Init FAILED". Do you have any idea what this could be?

Here, I send you the ddraw.log 33840 11:24:26.260 Process path: C:\Program Files (x86)\Steam\steamapps\common\Deadlock2\DEADLOCK.EXE 33840 11:24:26.260 Loading DDrawCompat from C:\Program Files (x86)\Steam\steamapps\common\Deadlock2\DDRAW.dll 33840 11:24:26.265 DDrawCompat loaded successfully 33840 11:24:28.435 Installing DirectDraw hooks 33840 11:24:28.526 Installing GDI hooks 33840 11:24:28.651 Installing registry hooks 33840 11:24:28.651 Finished installing hooks 33840 11:24:29.603 Failed to create the real primary surface 33840 11:24:40.042 Detaching DDrawCompat 33840 11:24:40.125 DDrawCompat detached successfully

DdrawCompat-Deadlock.log: 11:04:36.718 Process path: C:\Program Files (x86)\Steam\steamapps\common\Deadlock2\DEADLOCK.EXE 11:04:36.718 Environment variable __COMPAT_LAYER = "RunAsAdmin 640X480 HighDpiAware 16BitColor WinXPSp3" 11:04:36.718 Loading DDrawCompat statically from C:\Program Files (x86)\Steam\steamapps\common\Deadlock2\DDRAW.dll 11:04:38.109 DDrawCompat loaded successfully 11:04:39.470 Installing display mode hooks 11:04:40.199 Installing registry hooks 11:04:40.199 Installing Direct3D driver hooks 11:04:40.199 Installing Win32 hooks 11:04:40.290 Hooking user mode display driver: C:\Windows\System32\DriverStore\FileRepository\u0370468.inf_amd64_5e4260b11257b6e9\B370372\aticfx32.dll+0x5ddc0 11:04:40.354 Dynamic vertex buffers are available 11:04:40.354 Dynamic index buffers are available 11:04:40.364 Checking source color key support: passed 11:04:40.367 Incorrect z-buffer bit depth capabilities detected; changed from "16, 32" to "16, 24" 11:04:40.402 Installing DirectDraw hooks 11:04:40.409 Installing Direct3D hooks 11:04:40.413 Installing GDI hooks 11:04:40.458 Finished installing hooks 11:04:42.554 ERROR: Failed to create the real primary surface: 0x80070057 11:04:46.640 DDrawCompat detached successfully

narzoul commented 2 years ago

The GOG version still works fine for me on Windows 11. Could you please attach debug logs taken with the ReleaseWithDebugLogs build (from the DDrawCompat-v0.3.1-debug.zip file)?

sniper8952 commented 2 years ago

Thank you for your fast response. In this OneDrive Folder you can see the log. I hope it is the right one. If not you can tell it to me. https://optimio-my.sharepoint.com/:f:/p/dominic_johonyak/EkiTm4Hzh5tHnoXIxac-Du8BErpueVz8tEBRjTkHpv40fQ?e=aYg7on

narzoul commented 2 years ago

Thanks! The primary surface creation fails in your display driver. Maybe it doesn't support exclusive fullscreen mode on whatever display you're trying to put the game on. Do you have some unusual display setup, like a TV or secondary monitor attached or something? Try if it works on your primary monitor, without any extra devices attached.

PS: The game also supports a very simple windowed mode with the -w command line switch. Does that one work?

sniper8952 commented 2 years ago

Thanks! I tried to play the game only on the Notebook display. That is working. But if I wan't to play the game on my 32" Predator display with 2K resolution the game is not starting. The interessting thing is my display at the notebook has also 2K. The command -w is working but the game is windowed in the left upper corner.

narzoul commented 2 years ago

How is your external monitor connected to the desktop? I think something like Duplicate may not work (I never really tried it), but Extend or "Second screen only" should work (Win+P shortcut). Although Extend may also require that your external monitor is set as the primary in Windows display settings.

sniper8952 commented 2 years ago

I have connected my notebook (Asus Zephyrus G14) via a Lenovo dock with USB-C. On this dock is a 24" and the 32" display. The 32" display is the main display. My screens are extended.

narzoul commented 2 years ago

Does the game start up in fullscreen mode on your 32" display without DDrawCompat?

sniper8952 commented 2 years ago

No, it doesn't. I tried to connect the HDMI cable from the 32" screen directly to my notebook. It looks like this will work. However, I don't understand why it doesn't work through the dock.... It makes no sense if I have to plug 2 cables into my notebook to play the game.

narzoul commented 2 years ago

It's probably a driver issue. I guess it can't handle exclusive fullscreen mode through USB-C for whatever reason. I don't think I can do anything about that. But the next release of DDrawCompat will have borderless fullscreen mode by default, which should work fine.

In the meantime, doesn't windowed mode kind of work like fullscreen if you set its compatibility settings to run in 640x480? At least this works for me with some annoyances, e.g. alt-tabbing to desktop or exiting the game doesn't restore the native resolution automatically.

sniper8952 commented 2 years ago

I have also already updated the Nvidia driver. That didn't help either. When will you release the new version?

narzoul commented 2 years ago

Not sure, maybe in the next couple of weeks, depending on how many more issues I find and how long it takes to fix them. I might also just wait for the next Windows 11 update, because according to some reports it will be incompatible with DDrawCompat, so it would need a quick fix too.

Based on your logs, the game is using AMD display drivers, not NVIDIA. Maybe another side effect of using the USB connection? Does it use NVIDIA drivers when the monitor is plugged in directly through HDMI? You can see it in the "Hooking user mode display driver:" line of the log.

sniper8952 commented 2 years ago

I tried to deaktivate my AMD onboard graficcard. And now if i started the game is shows me only a black screen but i can hear the sound. I tried it also with 640x480 and Windows XP mode.

narzoul commented 2 years ago

v0.4.0 has been released, does it fix the issue?

sniper8952 commented 2 years ago

With this Version its working! Thank you! Where you from? Magyar?