-
Notifications
You must be signed in to change notification settings - Fork 2
No pause or menu function on gamepad #7
Comments
Please check if commit be51d30 works for you. |
Sort of. I can get back to the menu and exit the game now, but...can it be configurable? Right now I don't see a way to do that, and it's set on button 2 (the "east" face button, on my controller, which is "shoot" by default.) Ideally it would be on "start" (button 8?) or "menu" (9?) if I can't configure it myself, but not all controllers have a "menu" button. In any case, it probably shouldn't be the "shoot" button in a shooting game ;) |
...I tried to remap "shoot" to the right-trigger as a temporary workaround, but the triggers aren't recognized, probably because they are analog axes? That may not be within the scope of this issue, however. |
Sorry I didn't mean to close this, that was an accident. |
The button is hardcoded right now, need to move to the newer SDL_GameController API so it would be possible to use standard mapped buttons. |
Looks like there's an off-by-one somewhere, so "button 8" here in the code is actually "button 9" in the game. "8(9)" is my Menu/Hotkey button and "7(8)" is my Start which feels more natural to me so I've set it like this locally with PR #12 but since it's going to be different for every gamepad, I don't know if you think it's worth merging. |
With that change on my end though, it's working great. Thanks! |
I've merged the change but it needs a better solution before going into master, so I'll keep the ticket open. |
I think I've found a shorcut, can you please check 9292ec8 to see if the start button is correctly detected at startup? |
I may not have much time with my system over the weekend but I will check it out when I get a chance. |
Got a chance to test a PS4 controller and it looks good, the SDL_CONTROLLER_BUTTON_START is detected as the button "Options", so I've implemented the mapping for all the required buttons. |
I think so, yeah. I only had a few minutes to test 3d67def but it's a real quick check to see if "start" works, or not. It did. To make sure it wasn't just falling back on the hardcoded default button value, I changed it back to "8" (my "menu" button) and recompiled, and it still paused the game on "start," not on "menu." |
Good! Hope the other buttons are correct too. |
There is no "pause" or "menu" button mapped to the gamepad. Once I begin a game, I cannot exit without pressing [Esc] on the keyboard (*well, I guess I can also wait till I lose all my lives and return to the menu that way. This is not an ideal solution for me.)
Can a pause/menu button be added to the gamepad mappings?
The text was updated successfully, but these errors were encountered: