mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-10-02 03:38:03 +03:00
Use a similar code style to bemanitools though reduce indentation to 2 spaces. Also some other tweaks to be more similar to google style.
29 lines
628 B
C
29 lines
628 B
C
#ifndef IO_UTIL_JOYSTICK_H
|
|
#define IO_UTIL_JOYSTICK_H
|
|
|
|
#include <linux/limits.h>
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
#define JOYSTICK_NAME_LEN 128
|
|
|
|
struct io_util_joystick {
|
|
char dev_path[PATH_MAX];
|
|
int handle;
|
|
uint16_t num_buttons;
|
|
uint16_t num_axes;
|
|
char name[JOYSTICK_NAME_LEN];
|
|
bool *button_state;
|
|
};
|
|
|
|
bool io_util_joystick_open(const char *dev_path, struct io_util_joystick **ctx);
|
|
|
|
bool io_util_joystick_close(struct io_util_joystick *ctx);
|
|
|
|
bool io_util_joystick_update(struct io_util_joystick *ctx);
|
|
|
|
bool io_util_joystick_is_button_pressed(
|
|
struct io_util_joystick *ctx, uint16_t button);
|
|
|
|
#endif
|