Removed all the bools for axis in constructor and adapted it to bitwise flags#244
Open
maduranma wants to merge 1 commit intoMHeironimus:masterfrom
Open
Removed all the bools for axis in constructor and adapted it to bitwise flags#244maduranma wants to merge 1 commit intoMHeironimus:masterfrom
maduranma wants to merge 1 commit intoMHeironimus:masterfrom
Conversation
…se cleaner integers with constants
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Hi,
I opened this issue a few days ago: #243
As you agreed with the solution, I just adapted the constructor to accept it.
I had to move the constants to the header file (that's as well included in the .cpp file).
I kept the all on by default by setting it to 255 by default:
Here is a demo of how it would work with the new constructor:
Also, I added the constant
JOYSTICK_INCLUDE_NONEas you might only want to have buttons, hat switches or just axis on the simulator flag or the axis flag. The value of this flag is0as that overrides the default 255 (all).If you consider this good, I can write/correct the docs and examples.