use crate::ecs::world::World;

pub fn query_active_gamepad(world: &mut World) -> Option<gilrs::Gamepad<'_>> {
    let gilrs = world.resources.input.gamepad.gilrs.as_mut()?;
    world
        .resources
        .input
        .gamepad
        .gamepad
        .map(|id| gilrs.gamepad(id))
}
