#[repr(transparent)]pub struct SDL_GamepadAxis(pub c_int);Expand description
The list of axes available on a gamepad
Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX, and are centered within ~8000 of zero, though advanced UI will allow users to set or autodetect the dead zone, which varies between gamepads.
Trigger axis values range from 0 (released) to SDL_JOYSTICK_AXIS_MAX (fully pressed) when reported by SDL_GetGamepadAxis(). Note that this is not the same range that will be reported by the lower-level SDL_GetJoystickAxis().
Available Since: This enum is available since SDL 3.2.0.
Tuple Fields§
§0: c_intImplementations§
Source§impl SDL_GamepadAxis
impl SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_INVALID: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_LEFTX: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_LEFTY: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_RIGHTX: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_RIGHTY: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_LEFT_TRIGGER: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_RIGHT_TRIGGER: SDL_GamepadAxis
pub const SDL_GAMEPAD_AXIS_COUNT: SDL_GamepadAxis
Trait Implementations§
Source§impl Clone for SDL_GamepadAxis
impl Clone for SDL_GamepadAxis
Source§fn clone(&self) -> SDL_GamepadAxis
fn clone(&self) -> SDL_GamepadAxis
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SDL_GamepadAxis
impl Debug for SDL_GamepadAxis
Source§impl Hash for SDL_GamepadAxis
impl Hash for SDL_GamepadAxis
Source§impl PartialEq for SDL_GamepadAxis
impl PartialEq for SDL_GamepadAxis
impl Copy for SDL_GamepadAxis
impl Eq for SDL_GamepadAxis
impl StructuralPartialEq for SDL_GamepadAxis
Auto Trait Implementations§
impl Freeze for SDL_GamepadAxis
impl RefUnwindSafe for SDL_GamepadAxis
impl Send for SDL_GamepadAxis
impl Sync for SDL_GamepadAxis
impl Unpin for SDL_GamepadAxis
impl UnsafeUnpin for SDL_GamepadAxis
impl UnwindSafe for SDL_GamepadAxis
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more