matherp Guru
 Joined: 11/12/2012 Location: United KingdomPosts: 9773 |
Posted: 04:45pm 02 Feb 2025 |
|
|
|
Here is an idea.
new command
GAMEPAD MAP array%(3,16)
// flexible configuration of gamepads // each element in the array represents the bit in the bitmap - ? device(gamepad n,B) // first array element is the index into the USB report // second element is the value related to the bit // third element is mode // mode 0: bit is bit not used // mode 1: bit is set if 1 // mode 2: bit is set if 0 // mode 3: bit is set if value greater than // mode 4: bit is set if value less than
You can already retrieve the PID/VID of a connected device with MM.INFO(USB VID n) and MM.INFO(USB PID n)
So, the code can upload the relevant mapping based on the PID/VID of the device connected. We can build a library of DIM arrays by VID PID |