-
-
Notifications
You must be signed in to change notification settings - Fork 10.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementation examples link to xinput 1.4 which doesn't work on Windows 7 #2716
Comments
Things I can think of:
|
Windows 7 support will end tomorrow.. maybe this is no longer an issue very soon? :) (Unless you want to support Windows 7 despite Microsoft ending official support, of course!) |
Hello Melissa! I think we took this from the wrong angle: If you want your app to reliably run on Windows 7 (regardless of its obsolescence) you should use an older Windows SDK. Newer version of Visual Studio allow you to select and change which Windows SDK you are using and you can install old ones. That said, I am going to push a compile-time option |
That's a good solution I suppose! I'm definitely not using any of the gamepad features myself. |
…AMEPAD and IMGUI_IMPL_WIN32_DISABLE_LINKING_XINPUT. (#2716)
Pushed |
Thank you! ❤️ I assume |
That's correct! Since it appears that header/api are compatible you could just disable linking if you need. |
For what it's worth, I compiled my project with Windows 10 SDK, but I specifically targetted Windows 7 (by defining |
Xinput 9.1.0 is the original release and it's truly old and halfassed. If you don't want to require users to install the dx redist on w10, you can just do something like PCSX2/pcsx2#1237 |
Yes, that would be the best way to go around it. It would also allow to gracefully not support gamepad at all in the (very, very unlikely) case where no xinput DLL can be loaded. In the best case it should try in the following order:
|
I'd be very happy to take a PR doing that (with minimum amount of cruft and code overhead so it doesn't overwhelm casual readers). |
I'll have to research this for my own purposes already so I might as well PR it back upstream, sure! |
It all depends on the features you need. If everything you are doing is just checking a) if the controller is connected and b) the buttons mapping
https://walbourn.github.io/xinput-and-windows-8/ |
I made that sentence exactly after having checked wherever xinput was being used to begin with. |
This has been reworked and better solved by #3646 |
Version/Branch of Dear ImGui:
Version: 1.72b
Branch: docking
Back-end/Renderer/Compiler/OS
Back-ends: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
Compiler: Visual Studio 2017
Operating System: Windows 10
My Issue/Question:
This issue is in response to #787. As of recently with the added gamepad inputs, Dear ImGui added a pragma link to the source to automatically link to
xinput
:This will cause MSVC to link against
xinput1_4.dll
, which is not available on Windows 7. (It probably will link against 1.3 or the strangely named "9.1.0" if you're building on a Windows 7 machine though.)Since there are 3 possible versions of xinput, I propose a possible fix where we link with xinput 9.1.0 instead, which is shipped both within the 8.1 SDK and up, and on Windows 7 and up.
It's a bit weird that this is even required, but this will cause MSVC to link against
Xinput9_1_0.dll
, which seems to be available everywhere.The text was updated successfully, but these errors were encountered: