narzoul / DDrawCompat

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

Can't ALT+TAB in Diablo (1996) #186

Open MacPaiva opened 1 year ago

MacPaiva commented 1 year ago

When I use DDRAWCompat latest version with Diablo (1996), I can't ALT+TAB from the game. Is this a normal behavior?

narzoul commented 1 year ago

Do you mean you can alt+tab with earlier versions of DDrawCompat? I can use alt+tab without problems. We might have different versions of the game. Mine is from an old retail CD, without expansions. If you have a very recent version (e.g. from GOG) I think it no longer uses ddraw. Do you have a DDrawCompat-diablo.log file?

MacPaiva commented 1 year ago

Oh, I don't know if with older versions it is possible to use the alt + tab, I just wanted to clarify that I had this using the latest version. About Diablo version, I'm also using a retail CD with the game patched to latest version (1.09b I think). Here's my DDRawCompat log file. Thanks for the help! DDrawCompat-Diablo.log

narzoul commented 1 year ago

Hmm, strange, after upgrading to 1.09b, I can't alt-tab either. I think it has something to do with the IgnoreAltTab shim applied from Microsoft's compatibility database: diablo_compat

DDrawCompat is supposed to work around that, I will look into why it doesn't work later. I'm also unsure why it works with the unpatched (1.0) version.

As a workaround, you can try renaming Diablo.exe to something else, so that the IgnoreAltTab shim doesn't get applied.

MacPaiva commented 1 year ago

Awesome! Thank you!

narzoul commented 7 months ago

I checked it out and the problem is caused by the game loading ddraw dynamically after the compatibility setting already installed its keyboard hook to block alt+tab, so DDrawCompat can't stop it from installing. I don't know of a clean way to remove it afterwards, but I might try some ideas later.