MgAl2O4 / FFTriadBuddy

FF14 Triple Triad helper
MIT License
129 stars 17 forks source link

Windows 7 support #45

Closed baldurk closed 3 years ago

baldurk commented 3 years ago

Hey, I don't know if you intend to support windows 7 but I ran into a couple of issues and I thought I'd let you know.

  1. The most recent release crashes on launch, because it has a delay-load dependency on xinput1_4.dll which isn't available on win7. This is easily worked around by copying in xinput1_3.dll and renaming it, since all the used functions have the same signature and it works (at least as far as I tested, I don't use a controller).

  2. The Play: Screenshot mode didn't work for me immediately. I dug in and it seems like the PrintWindow codepath that you run through when win7 or earlier is detected is returning a black image. I'm not sure why, I didn't investigate very far with that since I tried forcing bIsNewerThanWindows7 = true and the Graphics.CopyFromScreen path worked fine for me.

Like I say, feel free to close this issue if you don't want to support win7, but with a couple of tweaks it works great :+1: for me. Thanks for the project!

MgAl2O4 commented 3 years ago

Thanks for info, I didn't know about the crash issue (not using controller either, was a pull request) - will get it fixed.

Screenshot code path was working at some point, but then I moved to win10 and something changed with the game? No idea, at least that part is easy to fix.

baldurk commented 3 years ago

If I had to guess I suspect the way they're initialising DX11 and the DXGI swapchain it bypasses GDI which is probably how PrintWindow works. Maybe it worked on DX9 previously? Either way like you say it's an easy fix :smile:.

MgAl2O4 commented 3 years ago

Guess fix in v73, probably works but can't test myself (wrapped in try - catch to avoid blowing up on missing dll)

baldurk commented 3 years ago

Confirmed that it works. Thanks again!