#include #include #include SDL_Joystick *joy; #undef main int main(int poo, char **poo2) { if (SDL_Init(SDL_INIT_JOYSTICK) < 0) { MessageBox(NULL,"Unable to start SDL!","Error",MB_ICONERROR | MB_OK); return; } joy = SDL_JoystickOpen(0); printf("Joystick Name: %s\n",SDL_JoystickName(0)); if(joy) { printf("Number of Axes: %s\n", SDL_JoystickNumAxes(joy)); printf("Number of Buttons: %s\n", SDL_JoystickNumButtons(joy)); printf("Number of Balls: %s\n", SDL_JoystickNumBalls(joy)); } else printf("Couldn't open Joystick 0\n"); SDL_JoystickClose(0); SDL_Quit(); system("PAUSE"); return 0; }