30,11 → 30,7 |
#ifndef _SDL_joystick_h |
#define _SDL_joystick_h |
|
#include <stddef.h> |
|
#include "SDL_types.h" |
#include "SDL_error.h" |
#include "SDL_events.h" |
|
#include "begin_code.h" |
/* Set up for C function definitions, even when using C++ */ |
51,16 → 47,12 |
struct _SDL_Joystick; |
typedef struct _SDL_Joystick SDL_Joystick; |
|
#warning "Joysticks are not supported in KolibriOS. All functions are stubs!" |
|
/* Function prototypes */ |
/* |
* Count the number of joysticks attached to the system |
*/ |
static inline DECLSPEC int SDL_NumJoysticks(void) |
{ |
return 0; |
} |
extern DECLSPEC int SDL_NumJoysticks(void); |
|
/* |
* Get the implementation dependent name of a joystick. |
67,10 → 59,7 |
* This can be called before any joysticks are opened. |
* If no name can be found, this function returns NULL. |
*/ |
static inline DECLSPEC const char *SDL_JoystickName(int device_index) |
{ |
return NULL; |
} |
extern DECLSPEC const char *SDL_JoystickName(int device_index); |
|
/* |
* Open a joystick for use - the index passed as an argument refers to |
79,34 → 68,22 |
* |
* This function returns a joystick identifier, or NULL if an error occurred. |
*/ |
static inline DECLSPEC SDL_Joystick *SDL_JoystickOpen(int device_index) |
{ |
return NULL; |
} |
extern DECLSPEC SDL_Joystick *SDL_JoystickOpen(int device_index); |
|
/* |
* Returns 1 if the joystick has been opened, or 0 if it has not. |
*/ |
static inline DECLSPEC int SDL_JoystickOpened(int device_index) |
{ |
return 0; |
} |
extern DECLSPEC int SDL_JoystickOpened(int device_index); |
|
/* |
* Get the device index of an opened joystick. |
*/ |
static inline DECLSPEC int SDL_JoystickIndex(SDL_Joystick *joystick) |
{ |
return -1; |
} |
extern DECLSPEC int SDL_JoystickIndex(SDL_Joystick *joystick); |
|
/* |
* Get the number of general axis controls on a joystick |
*/ |
static inline DECLSPEC int SDL_JoystickNumAxes(SDL_Joystick *joystick) |
{ |
return -1; |
} |
extern DECLSPEC int SDL_JoystickNumAxes(SDL_Joystick *joystick); |
|
/* |
* Get the number of trackballs on a joystick |
113,26 → 90,17 |
* Joystick trackballs have only relative motion events associated |
* with them and their state cannot be polled. |
*/ |
static inline DECLSPEC int SDL_JoystickNumBalls(SDL_Joystick *joystick) |
{ |
return -1; |
} |
extern DECLSPEC int SDL_JoystickNumBalls(SDL_Joystick *joystick); |
|
/* |
* Get the number of POV hats on a joystick |
*/ |
static inline DECLSPEC int SDL_JoystickNumHats(SDL_Joystick *joystick) |
{ |
return -1; |
} |
extern DECLSPEC int SDL_JoystickNumHats(SDL_Joystick *joystick); |
|
/* |
* Get the number of buttons on a joystick |
*/ |
static inline DECLSPEC int SDL_JoystickNumButtons(SDL_Joystick *joystick) |
{ |
return -1; |
} |
extern DECLSPEC int SDL_JoystickNumButtons(SDL_Joystick *joystick); |
|
/* |
* Update the current state of the open joysticks. |
139,10 → 107,7 |
* This is called automatically by the event loop if any joystick |
* events are enabled. |
*/ |
static inline DECLSPEC void SDL_JoystickUpdate(void) |
{ |
/* STUB! */ |
} |
extern DECLSPEC void SDL_JoystickUpdate(void); |
|
/* |
* Enable/disable joystick event polling. |
151,10 → 116,7 |
* information. |
* The state can be one of SDL_QUERY, SDL_ENABLE or SDL_IGNORE. |
*/ |
static inline DECLSPEC int SDL_JoystickEventState(int state) |
{ |
return SDL_IGNORE; |
} |
extern DECLSPEC int SDL_JoystickEventState(int state); |
|
/* |
* Get the current state of an axis control on a joystick |
161,10 → 123,7 |
* The state is a value ranging from -32768 to 32767. |
* The axis indices start at index 0. |
*/ |
static inline DECLSPEC Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis) |
{ |
return -1; |
} |
extern DECLSPEC Sint16 SDL_JoystickGetAxis(SDL_Joystick *joystick, int axis); |
|
/* |
* Get the current state of a POV hat on a joystick |
182,10 → 141,7 |
/* |
* The hat indices start at index 0. |
*/ |
static inline DECLSPEC Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat) |
{ |
return 0; |
} |
extern DECLSPEC Uint8 SDL_JoystickGetHat(SDL_Joystick *joystick, int hat); |
|
/* |
* Get the ball axis change since the last poll |
192,27 → 148,20 |
* This returns 0, or -1 if you passed it invalid parameters. |
* The ball indices start at index 0. |
*/ |
static inline DECLSPEC int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy) |
{ |
return -1; |
} |
extern DECLSPEC int SDL_JoystickGetBall(SDL_Joystick *joystick, int ball, int *dx, int *dy); |
|
/* |
* Get the current state of a button on a joystick |
* The button indices start at index 0. |
*/ |
static inline DECLSPEC Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button) |
{ |
return 0; |
} |
extern DECLSPEC Uint8 SDL_JoystickGetButton(SDL_Joystick *joystick, int button); |
|
/* |
* Close a joystick previously opened with SDL_JoystickOpen() |
*/ |
static inline DECLSPEC void SDL_JoystickClose(SDL_Joystick *joystick) |
{ |
/* STUB! */ |
} |
extern DECLSPEC void SDL_JoystickClose(SDL_Joystick *joystick); |
|
|
/* Ends C function definitions when using C++ */ |
#ifdef __cplusplus |
} |