mirror of
https://github.com/encounter/SDL.git
synced 2025-12-09 21:47:44 +00:00
Cleanups in the joystick code.
Removed some redundant state and other confusions. Fixes Bugzilla #2738.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user