projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added video frame counter (currently not used)
[rocksndiamonds.git]
/
src
/
libgame
/
joystick.h
diff --git
a/src/libgame/joystick.h
b/src/libgame/joystick.h
index f3be29545672d5e2b636ba5b2ec17ab4d3f1c7db..f9c518007859f8bfc2d46b1ef170266aa9a059c2 100644
(file)
--- a/
src/libgame/joystick.h
+++ b/
src/libgame/joystick.h
@@
-17,8
+17,12
@@
#define JOYSTICK_NOT_AVAILABLE 0
#define JOYSTICK_AVAILABLE (1 << 0)
#define JOYSTICK_ACTIVE (1 << 1)
#define JOYSTICK_NOT_AVAILABLE 0
#define JOYSTICK_AVAILABLE (1 << 0)
#define JOYSTICK_ACTIVE (1 << 1)
+#define JOYSTICK_CONFIGURED (1 << 2)
+#define JOYSTICK_NOT_CONFIGURED (1 << 3)
#define JOYSTICK_ACTIVATED (JOYSTICK_AVAILABLE | JOYSTICK_ACTIVE)
#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"
#if defined(PLATFORM_FREEBSD)
#define DEV_JOYSTICK_0 "/dev/joy0"
#define DEV_JOYSTICK_1 "/dev/joy1"
@@
-31,8
+35,8
@@
#define DEV_JOYSTICK_3 "/dev/js3"
#endif
#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
#define JOYSTICK_MAX_AXIS_POS 32767
@@
-67,6
+71,7
@@
char *getJoyNameFromJoySymbol(int);
int getJoySymbolFromJoyName(char *);
int getJoystickNrFromDeviceName(char *);
char *getDeviceNameFromJoystickNr(int);
int getJoySymbolFromJoyName(char *);
int getJoystickNrFromDeviceName(char *);
char *getDeviceNameFromJoystickNr(int);
+char *getFormattedJoystickName(const char *);
void CheckJoystickData(void);
int Joystick(int);
void CheckJoystickData(void);
int Joystick(int);
@@
-75,7
+80,7
@@
int JoystickButton(int);
int AnyJoystick(void);
int AnyJoystickButton(void);
int AnyJoystick(void);
int AnyJoystickButton(void);
-void DeactivateJoystick();
-void ActivateJoystick();
+void DeactivateJoystick(
void
);
+void ActivateJoystick(
void
);
-#endif /
* JOYSTICK_H */
+#endif /
/ JOYSTICK_H