glfw: add joystick hat states
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
025891f0b9
commit
73055427ad
2 changed files with 18 additions and 1 deletions
16
glfw/src/hat.zig
Normal file
16
glfw/src/hat.zig
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
//! Joystick hat states
|
||||
//!
|
||||
//! See glfw.getJoystickHats for how these are used.
|
||||
|
||||
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
||||
|
||||
pub const centered = C.GLFW_HAT_CENTERED;
|
||||
pub const up = C.GLFW_HAT_UP;
|
||||
pub const right = C.GLFW_HAT_RIGHT;
|
||||
pub const down = C.GLFW_HAT_DOWN;
|
||||
pub const left = C.GLFW_HAT_LEFT;
|
||||
|
||||
pub const right_up = right | up;
|
||||
pub const right_down = right | down;
|
||||
pub const left_up = left | up;
|
||||
pub const left_down = left | down;
|
||||
|
|
@ -3,8 +3,9 @@ const testing = std.testing;
|
|||
|
||||
const c = @cImport(@cInclude("GLFW/glfw3.h"));
|
||||
|
||||
pub const version = @import("version.zig");
|
||||
pub const action = @import("action.zig");
|
||||
pub const hat = @import("hat.zig");
|
||||
pub const version = @import("version.zig");
|
||||
|
||||
pub fn basicTest() void {
|
||||
if (c.glfwInit() != c.GLFW_TRUE) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue