Struct sdl2::GameControllerSubsystem
[−]
[src]
pub struct GameControllerSubsystem { // some fields omitted }
Methods
impl GameControllerSubsystem
[src]
fn num_joysticks(&self) -> SdlResult<u32>
Retreive the total number of attached joysticks and controllers identified by SDL.
fn is_game_controller(&self, id: u32) -> bool
Return true if the joystick at index id
is a game controller.
fn open(&self, id: u32) -> SdlResult<GameController>
Attempt to open the controller number id
and return
it. Controller IDs are the same as joystick IDs and the
maximum number can be retreived using the SDL_NumJoysticks
function.
fn name_for_index(&self, id: u32) -> SdlResult<String>
Return the name of the controller at index id
fn set_event_state(&self, state: bool)
If state is true
controller events are processed, otherwise
they're ignored.
fn event_state(&self) -> bool
Return true
if controller events are processed.
fn add_mapping(&self, mapping: &str) -> SdlResult<MappingStatus>
Add a new mapping from a mapping string
fn mapping_for_guid(&self, guid: Guid) -> SdlResult<String>
fn update(&self)
Force controller update when not using the event loop
impl GameControllerSubsystem
[src]
Trait Implementations
impl Clone for GameControllerSubsystem
[src]
fn clone(&self) -> GameControllerSubsystem
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more