Use GamepadAxis enum for getGamepadAxisMovement instead of c_int (#187)

* Updated getGamepadAxisMovement to take enum and cast return to f32

* Updated raylib-ext.zig GetGamepadAxisMovement to take enum

* modified generate_functions.py to make changes instead
This commit is contained in:
James Davis 2025-01-10 13:18:45 -05:00 committed by GitHub
parent 561481f4ae
commit 30ce68004f
Failed to generate hash of commit
3 changed files with 4 additions and 3 deletions

View file

@ -3169,8 +3169,8 @@ pub fn getGamepadAxisCount(gamepad: i32) i32 {
}
/// Get axis movement value for a gamepad axis
pub fn getGamepadAxisMovement(gamepad: i32, axis: i32) f32 {
return cdef.GetGamepadAxisMovement(@as(c_int, gamepad), @as(c_int, axis));
pub fn getGamepadAxisMovement(gamepad: i32, axis: GamepadAxis) f32 {
return cdef.GetGamepadAxisMovement(@as(c_int, gamepad), axis);
}
/// Set internal gamepad mappings (SDL_GameControllerDB)