Struct sdl2::controller::GameController
[−]
[src]
pub struct GameController { /* fields omitted */ }
Wrapper around the SDL_GameController object
Methods
impl GameController
[src]
pub fn subsystem(&self) -> &GameControllerSubsystem
[src]
pub fn name(&self) -> String
[src]
Return the name of the controller or an empty string if no name is found.
pub fn mapping(&self) -> String
[src]
Return a String describing the controller's button and axis mappings
pub fn attached(&self) -> bool
[src]
Return true if the controller has been opened and currently connected.
pub fn instance_id(&self) -> i32
[src]
Return the joystick id of this controller
pub fn axis(&self, axis: Axis) -> i16
[src]
Get the position of the given axis
[src]
Returns true
if button
is pressed.