Cleanups in the joystick code.
Removed some redundant state and other confusions. Fixes Bugzilla #2738.
This commit is contained in:
parent
4a071b311b
commit
162ef5eae9
15 changed files with 24 additions and 59 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue