//! Gamepad controller input state.

/// Gamepad controller state (requires `gamepad` feature).
#[cfg(feature = "gamepad")]
#[derive(Default)]
pub struct Gamepad {
    /// gilrs library instance.
    pub gilrs: Option<gilrs::Gilrs>,
    /// Currently active gamepad ID.
    pub gamepad: Option<gilrs::GamepadId>,
    /// Pending gamepad events this frame.
    pub events: Vec<gilrs::Event>,
}

/// Stub gamepad state when the `gamepad` feature is disabled.
#[cfg(not(feature = "gamepad"))]
#[derive(Default)]
pub struct Gamepad;
