This repository has been archived by the owner on Mar 30, 2019. It is now read-only.
Update Mapping.xml - fix GamepadButtonFlags #963
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change GamepadButtonFlags mapping from type short to ushort to fix issue with Y flag being incorrectly mapped. Y flag is currently mapped to Y = short.MinValue. It should be mapped to Y = 32768. I think changing the type to ushort should correctly remap the enumeration.
Edit: Although I think this behaviour of the code generator may indicate a problem with how it handles the mapping of flags enumerations. It shouldn't try to wrap the enumeration - if that's what it's doing. But that is beyond my ability to investigate, so I can only suggest that as a possible problem.
Edit : Apologies for the mess here, the correct type should be int, not ushort, as ushort isn't a supported type in the SharpDX build software for the enumeration. I've submitted a fresh pull request. But not sure if I should close this PR first or what. GitHub seems to have appended my fresh PR to this one. I've checked the enumeration after building SharpDX, and it looks OK now with int as the type.