mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-20 22:16:49 +01:00
Emscripten: Deactivated and corrected debug log messages on joystick events.
This commit is contained in:
parent
6abd242b93
commit
3941848838
@ -105,7 +105,9 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa
|
|||||||
}
|
}
|
||||||
|
|
||||||
++numjoysticks;
|
++numjoysticks;
|
||||||
SDL_Log("%d",numjoysticks);
|
#ifdef DEBUG_JOYSTICK
|
||||||
|
SDL_Log("Number of joysticks is %d", numjoysticks);
|
||||||
|
#endif
|
||||||
#if !SDL_EVENTS_DISABLED
|
#if !SDL_EVENTS_DISABLED
|
||||||
event.type = SDL_JOYDEVICEADDED;
|
event.type = SDL_JOYDEVICEADDED;
|
||||||
|
|
||||||
@ -118,7 +120,9 @@ Emscripten_JoyStickConnected(int eventType, const EmscriptenGamepadEvent *gamepa
|
|||||||
}
|
}
|
||||||
#endif /* !SDL_EVENTS_DISABLED */
|
#endif /* !SDL_EVENTS_DISABLED */
|
||||||
|
|
||||||
|
#ifdef DEBUG_JOYSTICK
|
||||||
SDL_Log("Added joystick with index %d", item->index);
|
SDL_Log("Added joystick with index %d", item->index);
|
||||||
|
#endif
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@ -144,7 +148,6 @@ Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gam
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const int retval = item->device_instance;
|
|
||||||
if (item->joystick) {
|
if (item->joystick) {
|
||||||
item->joystick->hwdata = NULL;
|
item->joystick->hwdata = NULL;
|
||||||
}
|
}
|
||||||
@ -174,7 +177,9 @@ Emscripten_JoyStickDisconnected(int eventType, const EmscriptenGamepadEvent *gam
|
|||||||
}
|
}
|
||||||
#endif /* !SDL_EVENTS_DISABLED */
|
#endif /* !SDL_EVENTS_DISABLED */
|
||||||
|
|
||||||
SDL_Log("Removed joystick with index %d", retval);
|
#ifdef DEBUG_JOYSTICK
|
||||||
|
SDL_Log("Removed joystick with id %d", item->device_instance);
|
||||||
|
#endif
|
||||||
SDL_free(item->name);
|
SDL_free(item->name);
|
||||||
SDL_free(item->mapping);
|
SDL_free(item->mapping);
|
||||||
SDL_free(item);
|
SDL_free(item);
|
||||||
|
Loading…
Reference in New Issue
Block a user