Cleanups in the joystick code.

Removed some redundant state and other confusions.

Fixes Bugzilla #2738.
This commit is contained in:
Ryan C. Gordon 2015-03-24 13:52:01 -04:00
parent 4a071b311b
commit 162ef5eae9
15 changed files with 24 additions and 59 deletions

View file

@ -56,6 +56,12 @@ loop(void *arg)
while (SDL_PollEvent(&event)) {
switch (event.type) {
case SDL_JOYDEVICEREMOVED:
SDL_Log("Joystick device %d removed.\n", (int) event.jdevice.which);
SDL_Log("Our instance ID is %d\n", (int) SDL_JoystickInstanceID(joystick));
break;
case SDL_JOYAXISMOTION:
SDL_Log("Joystick %d axis %d value: %d\n",
event.jaxis.which,