Skip to content

Minor improvements to parseGenericController()#13

Open
kevinmoran wants to merge 2 commits into
MysteriousJ:mainfrom
kevinmoran:parse-generic-improvements
Open

Minor improvements to parseGenericController()#13
kevinmoran wants to merge 2 commits into
MysteriousJ:mainfrom
kevinmoran:parse-generic-improvements

Conversation

@kevinmoran

Copy link
Copy Markdown
  • When calling HidP_GetUsageValue for axes/dpad, use NotRange.Usage instead of Range.UsageMin. This wasn't a bug because these are overlapping members in a typed union, but valueCaps[i].IsRange is false for these inputs so this is the intended usage, think it's better for clarity
  • Replace hardcoded usage values with the defines for readability
  • Fixed a probably trivial bug where buttonCount was always calculated from first element in buttonCaps array - For the gamepads I tested all the buttons are always in the buttonCaps[0] so I doubt this was ever hit, but it gave me some confusion in the debugger for my Dualsense controller which has a second buttonCap

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant