Thanks Magu! (sorry, don't know your name. It shows up as magu...@gmail)
I'll add your mapping to the database. You can also kinda see how the SDL2
style GUID is being created from the DirectInput GUID:
1070f30 --> 01 07 0f 30 --> 30 0f 07 01 --> 300f0701 +
000000000000504944564944 = 300f0701000000000000504944564944.
The end of the string, "504944564944", is just hex for "PIDVID". This seems
to be the pattern for all USB controllers on Windows:
> >>> binascii.unhexlify("504944564944")
>
>> b'PIDVID'
>>
>
There are one or two strings I've come across that do not fit this pattern,
but I think this is a good start.
-Ben
On Thursday, November 19, 2015 at 5:14:46 AM UTC+9, [email protected] wrote:
>
> Here's the output:
>
> "USB 4-Axis 12-Button Gamepad", 300f0701000000000000504944564944
>
> and the map string:
>
> Mapping string: '300f0701000000000000504944564944,USB 4-Axis 12-Button
> Gamepad,a:b2,b:b1,x:b3,y:b0,back:b8,start:b9,leftstick:b10,rightstick:b11,leftshoulder:b4,rightshoulder:b5,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a3,righty:a2,lefttrigger:b6,righttrigger:b7,platform:Windows,'
>
>
>
--
You received this message because you are subscribed to the Google Groups
"pyglet-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.