SDL
2.0
|
Go to the source code of this file.
Macros | |
#define | SCREEN_WIDTH 640 |
#define | SCREEN_HEIGHT 480 |
Functions | |
static void | DrawRect (SDL_Renderer *r, const int x, const int y, const int w, const int h) |
void | loop (void *arg) |
static SDL_bool | WatchJoystick (SDL_Joystick *joystick) |
int | main (int argc, char *argv[]) |
Variables | |
SDL_Renderer * | screen = NULL |
SDL_bool | retval = SDL_FALSE |
SDL_bool | done = SDL_FALSE |
#define SCREEN_HEIGHT 480 |
Definition at line 32 of file testjoystick.c.
Referenced by loop(), and WatchJoystick().
#define SCREEN_WIDTH 640 |
Definition at line 31 of file testjoystick.c.
Referenced by loop(), and WatchJoystick().
|
static |
Definition at line 47 of file testjoystick.c.
References SDL_JoyAxisEvent::axis, SDL_JoyBallEvent::ball, SDL_JoyButtonEvent::button, done, DrawRect(), SDL_JoyHatEvent::hat, i, SDL_Event::jaxis, SDL_Event::jball, SDL_Event::jbutton, SDL_Event::jdevice, SDL_Event::jhat, SDL_Event::key, SDL_KeyboardEvent::keysym, retval, SCREEN_HEIGHT, SCREEN_WIDTH, SDL_ALPHA_OPAQUE, SDL_FINGERDOWN, SDL_HAT_CENTERED, SDL_HAT_DOWN, SDL_HAT_LEFT, SDL_HAT_RIGHT, SDL_HAT_UP, SDL_JOYAXISMOTION, SDL_JOYBALLMOTION, SDL_JOYBUTTONDOWN, SDL_JOYBUTTONUP, SDL_JOYDEVICEREMOVED, SDL_JOYHATMOTION, SDL_JoystickGetAttached, SDL_JoystickGetAxis, SDL_JoystickGetButton, SDL_JoystickGetHat, SDL_JoystickInstanceID, SDL_JoystickNumAxes, SDL_JoystickNumButtons, SDL_JoystickNumHats, SDL_KEYDOWN, SDL_Log, SDL_MOUSEBUTTONDOWN, SDL_PollEvent, SDL_PRESSED, SDL_QUIT, SDL_RenderClear, SDL_RenderPresent, SDL_SetRenderDrawColor, SDL_TRUE, SDLK_AC_BACK, SDLK_ESCAPE, SDL_Keysym::sym, SDL_Event::type, SDL_JoyAxisEvent::value, SDL_JoyHatEvent::value, SDL_JoyAxisEvent::which, SDL_JoyBallEvent::which, SDL_JoyHatEvent::which, SDL_JoyButtonEvent::which, SDL_JoyDeviceEvent::which, SDL_JoyBallEvent::xrel, and SDL_JoyBallEvent::yrel.
Referenced by WatchJoystick().
int main | ( | int | argc, |
char * | argv[] | ||
) |
Definition at line 240 of file testjoystick.c.
References device, i, NULL, SDL_assert, SDL_FALSE, SDL_FINGERDOWN, SDL_GetError, SDL_HINT_ACCELEROMETER_AS_JOYSTICK, SDL_Init, SDL_INIT_JOYSTICK, SDL_INIT_VIDEO, SDL_JOYDEVICEADDED, SDL_JOYSTICK_TYPE_ARCADE_PAD, SDL_JOYSTICK_TYPE_ARCADE_STICK, SDL_JOYSTICK_TYPE_DANCE_PAD, SDL_JOYSTICK_TYPE_DRUM_KIT, SDL_JOYSTICK_TYPE_FLIGHT_STICK, SDL_JOYSTICK_TYPE_GAMECONTROLLER, SDL_JOYSTICK_TYPE_GUITAR, SDL_JOYSTICK_TYPE_THROTTLE, SDL_JOYSTICK_TYPE_WHEEL, SDL_JoystickClose, SDL_JoystickFromInstanceID, SDL_JoystickGetGUID, SDL_JoystickGetGUIDString, SDL_JoystickGetProduct, SDL_JoystickGetType, SDL_JoystickGetVendor, SDL_JoystickInstanceID, SDL_JoystickNameForIndex, SDL_JoystickNumAxes, SDL_JoystickNumBalls, SDL_JoystickNumButtons, SDL_JoystickNumHats, SDL_JoystickOpen, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO, SDL_LogError, SDL_LogSetPriority, SDL_MOUSEBUTTONDOWN, SDL_NumJoysticks, SDL_QUIT, SDL_QuitSubSystem, SDL_SetHint, SDL_TRUE, SDL_WaitEvent, SDL_Event::type, and WatchJoystick().
|
static |
Definition at line 187 of file testjoystick.c.
References done, loop(), NULL, retval, SCREEN_HEIGHT, SCREEN_WIDTH, SDL_ALPHA_OPAQUE, SDL_CreateRenderer, SDL_CreateWindow, SDL_DestroyRenderer, SDL_DestroyWindow, SDL_FALSE, SDL_GetError, SDL_JoystickInstanceID, SDL_JoystickName, SDL_JoystickNumAxes, SDL_JoystickNumBalls, SDL_JoystickNumButtons, SDL_JoystickNumHats, SDL_Log, SDL_LOG_CATEGORY_APPLICATION, SDL_LogError, SDL_RaiseWindow, SDL_RenderClear, SDL_RenderPresent, SDL_SetRenderDrawColor, and SDL_WINDOWPOS_CENTERED.
Referenced by main().
Definition at line 37 of file testjoystick.c.
Referenced by loop(), and WatchJoystick().
Definition at line 36 of file testjoystick.c.
Referenced by loop(), and WatchJoystick().
SDL_Renderer* screen = NULL |
Definition at line 35 of file testjoystick.c.