-
Notifications
You must be signed in to change notification settings - Fork 54
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
Improve gamepad support #17
Improve gamepad support #17
Commits on Feb 13, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 9c84072 - Browse repository at this point
Copy the full SHA 9c84072View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd3f020 - Browse repository at this point
Copy the full SHA bd3f020View commit details -
Update key code strings for game controllers
With the SDL_GameController interface, buttons and axes have actual names we can refer to. This also allows for advanced mappings using both sticks (this probably needs script changes) as well as the triggers.
Configuration menu - View commit details
-
Copy full SHA for 937ddaf - Browse repository at this point
Copy the full SHA 937ddafView commit details
Commits on Feb 21, 2016
-
Implement "gamepad stick moved" events for analog input
Analog moved events are only sent once per control frame.
Configuration menu - View commit details
-
Copy full SHA for 8dd1450 - Browse repository at this point
Copy the full SHA 8dd1450View commit details -
SDL usage is masked with HAVE_SDL checks so it should work without SDL, but SDL has to be linked when it's available.
Configuration menu - View commit details
-
Copy full SHA for 1147d1a - Browse repository at this point
Copy the full SHA 1147d1aView commit details -
Make GetPlayerControlState() query the current controller state
To keep compatibility with scripts which expect only binary buttons, this adds a third parameter to the function which enables the new functionality. Bonus /script to test the controller stick x axis: Schedule(GetCursor(), "Message(\"%d / %d\", GetPlayerControlState(0, CON_Left, true), GetPlayerControlState(0, CON_Right, true))", 10, 100000000) Note that the values will be inconsistent if multiple analog sticks are bound to the same control, as values from one stick will overwrite those from the other one. This can happen even if you move only one stick.
Configuration menu - View commit details
-
Copy full SHA for 985f1b9 - Browse repository at this point
Copy the full SHA 985f1b9View commit details -
Update main menu GUI gamepad control bindings
It is now possible to control all GUI menus using the left stick or the dpad, along with the A and B buttons on the controller. This also doubles the button emulation dead zone to make navigating the menus with the stick easier.
Configuration menu - View commit details
-
Copy full SHA for 24622f3 - Browse repository at this point
Copy the full SHA 24622f3View commit details -
Make controller button strings nicer
This also removes the controller id from the control definitions, instead defaulting to 0. This doesn't change anything for now as we only had definitions for controller 0 anyways.
Configuration menu - View commit details
-
Copy full SHA for aa42d1d - Browse repository at this point
Copy the full SHA aa42d1dView commit details -
Remove unused and unimplemented gamepad functions
- GamePadControl::AnyButtonDown - GamePadOpener::SetGamePad
Configuration menu - View commit details
-
Copy full SHA for 046cacc - Browse repository at this point
Copy the full SHA 046caccView commit details -
New script functions: - PlayRumble(int plr, int strength, int length) - StopRumble(int plr)
Configuration menu - View commit details
-
Copy full SHA for 7155ff9 - Browse repository at this point
Copy the full SHA 7155ff9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9e9505f - Browse repository at this point
Copy the full SHA 9e9505fView commit details -
Use icons for all controller buttons
The icons currently only show Xbox 360 controller labeling. The icon set also includes icons for PlayStation controllers, so we could extend this in the future.
Configuration menu - View commit details
-
Copy full SHA for 9f69c65 - Browse repository at this point
Copy the full SHA 9f69c65View commit details -
Remove gamepad ids from key codes
We want one gamepad key mapping to work with multiple gamepads, so including the id there doesn't make sense. Additionally, the gamepad id may change during the game (controller hot-plugging).
Configuration menu - View commit details
-
Copy full SHA for 9e0143b - Browse repository at this point
Copy the full SHA 9e0143bView commit details
Commits on Feb 23, 2016
-
Make C4GamePadControl manage all controllers
The available gamepads are distributed automatically among players. This also implements controller hot-plugging: It is possible to start a game without a controller and plug it in later, and to reconnect a controller after plugging it out.
Configuration menu - View commit details
-
Copy full SHA for 8811356 - Browse repository at this point
Copy the full SHA 8811356View commit details -
Fix gamepads only working after game start
This affected all platforms other than SDL.
Configuration menu - View commit details
-
Copy full SHA for e52bf69 - Browse repository at this point
Copy the full SHA e52bf69View commit details
Commits on Feb 26, 2016
-
Configuration menu - View commit details
-
Copy full SHA for 2d47470 - Browse repository at this point
Copy the full SHA 2d47470View commit details
Commits on Mar 6, 2016
-
Make Windows build great again!
ckanibal committedMar 6, 2016 Configuration menu - View commit details
-
Copy full SHA for 8f31ae2 - Browse repository at this point
Copy the full SHA 8f31ae2View commit details