elishacloud / dxwrapper

Fixes compatibility issues with older games running on Windows 10/11 by wrapping DirectX dlls. Also allows loading custom libraries with the file extension .asi into game processes.
zlib License
1.23k stars 90 forks source link

alt tab can be trigged but the selected window cannot show up. #236

Open iujakchu opened 10 months ago

iujakchu commented 10 months ago

I tried to use it with plant vs zombie. I have to enable FullscreenWindowMode so the game launch with fullscreen mode, but I cannot switch to another window.

elishacloud commented 10 months ago

Yes, FullscreenWindowMode forces the window to be on the top. Try pressing Win+D to minimize all windows. Then you should be able to switch to another window after that.

iujakchu commented 10 months ago

Thanks for you reply. While Win+D works the same as alt+tab.

elishacloud commented 10 months ago

Ok, try this update and let me know if it works or not: dxwrapper.zip

iujakchu commented 10 months ago

Sorry,it does not work.The same behavior as before.

rebb commented 10 months ago

I fiddled around with a similar Alt-Tab / Minimize Issue a while ago, but it was for Windowed Mode, not sure if it applies here too. Don't know what the code changes are in the ZIP, maybe they are pretty much the same.

I haven't gotten around to pushing some of my stuff to my fork yet for a possible PR ( wasn't sure if it was too hacky anyway ).

My main code change was in IDirect3D9Ex.cpp, AdjustWindow Function changing SetWindowPos(MainhWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED); to SetWindowPos(MainhWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);

elishacloud commented 10 months ago

Try this update and let me know if this works or not: dxwrapper.zip

rebb commented 9 months ago

:thinking:

elishacloud commented 9 months ago

I am not sure if the last fix solved this issue. However, I can reproduce this issue with dd7to9 on a couple of games. What features of dxwrapper are you using for this game? I don't think setting HWND_NOTOPMOST is the right fix. I have seen where removing D3DCREATE_NOWINDOWCHANGES has solved this for some games.

rebb commented 9 months ago

Sorry, i just bumped the issue because i'm also curious about it and what the fix might be :) But it seems the Author is not available at the moment ? :(

elishacloud commented 2 months ago

Alt+Tab should work for most games with the latest build here: dx7 binaries.zip