glfw: add gamepad axis
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
fcc289a0eb
commit
98280d3be7
2 changed files with 14 additions and 0 deletions
13
glfw/src/gamepad_axis.zig
Normal file
13
glfw/src/gamepad_axis.zig
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
//! Gamepad axes.
|
||||||
|
//!
|
||||||
|
//! See glfw.getGamepadState for how these are used.
|
||||||
|
|
||||||
|
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
||||||
|
|
||||||
|
pub const left_x = C.GLFW_GAMEPAD_AXIS_LEFT_X;
|
||||||
|
pub const left_y = C.GLFW_GAMEPAD_AXIS_LEFT_Y;
|
||||||
|
pub const right_x = C.GLFW_GAMEPAD_AXIS_RIGHT_X;
|
||||||
|
pub const right_y = C.GLFW_GAMEPAD_AXIS_RIGHT_Y;
|
||||||
|
pub const left_trigger = C.GLFW_GAMEPAD_AXIS_LEFT_TRIGGER;
|
||||||
|
pub const right_trigger = C.GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER;
|
||||||
|
pub const left = right_trigger;
|
||||||
|
|
@ -4,6 +4,7 @@ const testing = std.testing;
|
||||||
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
||||||
|
|
||||||
pub const action = @import("action.zig");
|
pub const action = @import("action.zig");
|
||||||
|
pub const gamepad_axis = @import("gamepad_axis.zig");
|
||||||
pub const hat = @import("hat.zig");
|
pub const hat = @import("hat.zig");
|
||||||
pub const joystick = @import("joystick.zig");
|
pub const joystick = @import("joystick.zig");
|
||||||
pub const key = @import("key.zig");
|
pub const key = @import("key.zig");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue