X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fjoystick.h;h=f9c518007859f8bfc2d46b1ef170266aa9a059c2;hb=fe57866d9aa0cc2ebf48411eaf7bb4180cf85a84;hp=74dbad76c1b44a4bab313cd0c5387ceb0ce79b71;hpb=835e565490c1502920280c77eed9bb65fa932164;p=rocksndiamonds.git diff --git a/src/libgame/joystick.h b/src/libgame/joystick.h index 74dbad76..f9c51800 100644 --- a/src/libgame/joystick.h +++ b/src/libgame/joystick.h @@ -21,6 +21,8 @@ #define JOYSTICK_NOT_CONFIGURED (1 << 3) #define JOYSTICK_ACTIVATED (JOYSTICK_AVAILABLE | JOYSTICK_ACTIVE) +#define MAX_JOYSTICK_NAME_LEN 40 + #if defined(PLATFORM_FREEBSD) #define DEV_JOYSTICK_0 "/dev/joy0" #define DEV_JOYSTICK_1 "/dev/joy1" @@ -33,8 +35,8 @@ #define DEV_JOYSTICK_3 "/dev/js3" #endif -/* get these values from the program 'js' from the joystick package, */ -/* set JOYSTICK_PERCENT to a threshold appropriate for your joystick */ +// get these values from the program 'js' from the joystick package, +// set JOYSTICK_PERCENT to a threshold appropriate for your joystick #define JOYSTICK_MAX_AXIS_POS 32767 @@ -69,6 +71,7 @@ char *getJoyNameFromJoySymbol(int); int getJoySymbolFromJoyName(char *); int getJoystickNrFromDeviceName(char *); char *getDeviceNameFromJoystickNr(int); +char *getFormattedJoystickName(const char *); void CheckJoystickData(void); int Joystick(int); @@ -77,7 +80,7 @@ int JoystickButton(int); int AnyJoystick(void); int AnyJoystickButton(void); -void DeactivateJoystick(); -void ActivateJoystick(); +void DeactivateJoystick(void); +void ActivateJoystick(void); -#endif /* JOYSTICK_H */ +#endif // JOYSTICK_H