From d098e025ad72433a3aeb884d4c7c02cecd6555a0 Mon Sep 17 00:00:00 2001 From: Alan Oliveira Date: Fri, 25 Mar 2022 21:39:23 +0900 Subject: [PATCH] Use the right enum in the IsGamepadButtonXXX functions --- lib/raylib-wa.zig | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/raylib-wa.zig b/lib/raylib-wa.zig index 10fab63..2f79c3e 100644 --- a/lib/raylib-wa.zig +++ b/lib/raylib-wa.zig @@ -22,6 +22,7 @@ const Mesh = rl.Mesh; const Model = rl.Model; const ModelAnimation = rl.ModelAnimation; const MouseButton = rl.MouseButton; +const GamepadButton = rl.GamepadButton; const Music = rl.Music; const NPatchInfo = rl.NPatchInfo; const Quaternion = rl.Quaternion; @@ -192,10 +193,10 @@ pub extern fn GetKeyPressed() c_int; pub extern fn GetCharPressed() c_int; pub extern fn IsGamepadAvailable(gamepad: c_int) bool; pub extern fn GetGamepadName(gamepad: c_int) [*c]const u8; -pub extern fn IsGamepadButtonPressed(gamepad: c_int, button: MouseButton) bool; -pub extern fn IsGamepadButtonDown(gamepad: c_int, button: MouseButton) bool; -pub extern fn IsGamepadButtonReleased(gamepad: c_int, button: MouseButton) bool; -pub extern fn IsGamepadButtonUp(gamepad: c_int, button: MouseButton) bool; +pub extern fn IsGamepadButtonPressed(gamepad: c_int, button: GamepadButton) bool; +pub extern fn IsGamepadButtonDown(gamepad: c_int, button: GamepadButton) bool; +pub extern fn IsGamepadButtonReleased(gamepad: c_int, button: GamepadButton) bool; +pub extern fn IsGamepadButtonUp(gamepad: c_int, button: GamepadButton) bool; pub extern fn GetGamepadButtonPressed() c_int; pub extern fn GetGamepadAxisCount(gamepad: c_int) c_int; pub extern fn GetGamepadAxisMovement(gamepad: c_int, axis: c_int) f32;