pub fn open_controller(&self, id: JoystickID) -> Result<Controller<'_>, String> {
    let ptr = unsafe { SDL_GameControllerOpen(id.0) };
    if ptr.is_null() {
      Err(get_error())
    } else {
      Ok(Controller {
        ptr,
        _marker: PhantomData,
      })
    }
  }
/// Attempts to open the given id as a [Controller].
///
/// Not all joysticks support the Controller API, so this can fail.
Attempts to open the given id as a [Controller].
Not all joysticks support the Controller API, so this can fail.
Attempts to open the given id as a [ Controller ] . Not all joysticks support the Controller API so this can fail .
pub fn open_controller(&self, id: JoystickID) -> Result<Controller<'_>, String> {
    let ptr = unsafe { SDL_GameControllerOpen(id.0) };
    if ptr.is_null() {
      Err(get_error())
    } else {
      Ok(Controller {
        ptr,
        _marker: PhantomData,
      })
    }
  }
pub fn open_controller ( & self , id : JoystickID ) -> Result < Controller < ' _ > , String > { let ptr = unsafe { SDL_GameControllerOpen ( id . 0 ) } ; if ptr . is_null ( ) { Err ( get_error ( ) ) } else { Ok ( Controller { ptr , _marker : PhantomData , } ) } }
Attempts to open the given id as a [Controller].
Attempts to open the given id as a [ Controller ] .
&self
id
JoystickID
&self
id
JoystickID