microsoft / hidtools

Human Interface Device (HID) Tools for Windows and Devices
MIT License
156 stars 20 forks source link

Fails at first token #17

Closed Abrahamh08 closed 11 months ago

Abrahamh08 commented 11 months ago
Error @ 'applicationCollection
usage = ['Generic Desktop', 'Gamepad']

    applicationCollection' (L0) WAR99F361C9: Invalid token.

I get this error in the last 4 versions trying any sample. Haven't found a version that works yet

matwilli commented 11 months ago

What are your console parameters? Was the gamepad.wara file modified or transformed with a different encoding?

My output with latest binaries

Z:\Waratah-Published>WaratahCmd.exe -s gamepad.wara
Reading from file 'Z:\Waratah-Published\gamepad.wara'
Creating output file 'Z:\Waratah-Published\gamepad.h'
Successfully created output file 'Z:\Waratah-Published\gamepad.h'
Successfully generated descriptor file 'Z:\Waratah-Published\gamepad.h'

HID Usage Tables: 1.4.0
Descriptor size: 48 (bytes)
+----------+-------+-------------------+
| ReportId | Kind  | ReportSizeInBytes |
+----------+-------+-------------------+
|        1 | Input |                 2 |
+----------+-------+-------------------+
Abrahamh08 commented 11 months ago

It was not modified, but it must be a different encoding, because when I download gamepad.wara it works. It also works copied from github copy button into notepad and saved. It fails when saved from vim with git bash tested on Windows 11. If I don't create the file with vim in git bash, but go in the existing one and save, it also works. What steps can I take to get more information for you to figure out what's going on?

matwilli commented 11 months ago

Sounds like doing a binary diff of the two files (working, non-working) would reveal the encoding differences. I don't have a better suggestion for you :(