XInput over SDL
wh1sper.123.wtfit at gmail.com
Mon Jul 28 07:39:33 CDT 2014
No problem whatsoever ;) Coders should always be able to decide their goals
for the project and I already suspected answer like this. As I said, I can
always make unofficial patch for those that want XInput
I'd just ask one question if I may. Tried asking over irc, but it was dead
as graveyard during the night.
btw, beware... this code is broken in so many places it is not true (C++
examples are in much better state, though even after compiling them I
couldn't test it because it required VC++120d). But, it is nice example to
get the gist. More or less 99% of games use one or another variation of
What this does? Enumerates DirectInput devices, then enumerates all system
devices for each and every DirectInput device it was found, instigates
device creation and then checks if device ID contains "IG_". If that string
was present, it decides on using XInput. Some games go even a bit further
and send XInputSetValue on all ?XInput? controllers as secondary check,
where it uses fallback on DirectInput if error occured.
Every other solution out there simply hacks on CoSetProxyBlanket in order
to provide those extra devices, which is not exactly clean solution, but if
you don't have source like on Windows it is perfectly understandable.
Though in wine case, this could be implemented in much cleaner fashion
What should really happen in correct implementation?
Each and every XInput device should provide 2 devices, not 1 according to
MS specs. 1 for DirectInput and 1 for XInput. And XInput device should
contain "IG_" in device ID.
I'm not really versed in Windows, in fact I didn't used them for 20 years,
nor do I plan to do that in future. My experience with installing W8 just
to compile those examples was terrible enough to need serious yoga and
meditation treatments for next 30 years or so
This would spare me a lot of discovery. Which part of Wine is responsible
for device creation and enumeration in the case I specified? I would like
to finish it up and provide both devices needed
Also, 1 more bug (not in wine, but rather in implementations) as far as
controllers go. Some games just do incomprehensible and check string for
device name. So, if device name is not exact as MS specified, game won't
work no matter what.
On 28 July 2014 13:24, Henri Verbeet <hverbeet at gmail.com> wrote:
> On 26 July 2014 22:52, akjsdfk sdkfnskd <wh1sper.123.wtfit at gmail.com>
> > And before cleaning it, I just wanted to ask if XInput over SDL is
> wanted or
> > not. There is no point in working on regular patch if that is out of
> > question.
> I'm no authority on this, but I suspect we'd like to avoid an SDL
> dependency for this.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wine-devel