-
-
Notifications
You must be signed in to change notification settings - Fork 851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
About the constant value of gamepad-related #577
Comments
The results were almost identical for the Nintendo Switch joycon. The 8 variables listed in the previous message did not change no matter what button was pressed, while GAMEPAD1_BUTTON_RIGHTSHOULDER and GAMEPAD1_BUTTON_LEFTSHOULDER responded to the R and L buttons. |
Postscript. |
Because I don't have many gamepads and there are various kinds of gamepad, Pyxel just uses the SDL2's definitions and event parameters. https://github.com/kitao/pyxel/blob/main/rust/pyxel-platform/src/gamepad.rs#L187-L206 |
Thanks for the reply. As a point of interest after a little research, SDL_CONTROLLER_AXIS_LEFTX is not a Boolean type, but a number from 0~8000. https://wiki.libsdl.org/SDL2/SDL_GameControllerAxis However, I have found that if I use pyxel.btn(pyxel.GAMEPAD1_AXIS_LEFTX) Has it been confirmed that SDL_CONTROLLER_AXIS_LEFTX etc. works on some kind of gamepad? |
Now I see the situation. So when you would like to obtain those values, you need to use |
Thank you very much! |
Yes. I agree with you. |
I have a question about the gamepad related inputs defined in 'pyxel/python/pyxel/init.pyi'.
What input does each of the following variables correspond to?
GAMEPAD1_AXIS_LEFTX: int
GAMEPAD1_AXIS_LEFTY: int
GAMEPAD1_AXIS_RIGHTX: int
GAMEPAD1_AXIS_RIGHTY: int
GAMEPAD1_AXIS_TRIGGERLEFT: int
GAMEPAD1_AXIS_TRIGGERRIGHT: int
GAMEPAD1_BUTTON_LEFTSTICK: int
GAMEPAD1_BUTTON_RIGHTSTICK: int
I am using a stock XBOX controller to check the response of the controller and each variable, and the input of the gamepad analog sticks (there are two, left and right) had no effect on any of the variables, including DPAD_xx.
Also, pressing the RB and LB buttons responded to GAMEPAD1_BUTTON_RIGHTSHOULDER and GAMEPAD1_BUTTON_LEFTSHOULDER, but the RT and LT buttons did not seem to affect any of the variables in any way, as did the analog sticks.
The text was updated successfully, but these errors were encountered: