From 37a45b2e957dc645b6430bec4d955c35b46e07f3 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 14 Sep 2017 23:50:06 +0300 Subject: Add logging for joystick add/remove events in SDL 2. --- src/eventsmanager.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/eventsmanager.cpp b/src/eventsmanager.cpp index fec747ccc..28b50ba2b 100644 --- a/src/eventsmanager.cpp +++ b/src/eventsmanager.cpp @@ -426,7 +426,14 @@ void EventsManager::logEvent(const SDL_Event &event) event.button.x, event.button.y); break; - + case SDL_JOYDEVICEADDED: + logger->log("event: SDL_JOYDEVICEADDED: %d", + event.jdevice.which); + break; + case SDL_JOYDEVICEREMOVED: + logger->log("event: SDL_JOYDEVICEREMOVED: %d", + event.jdevice.which); + break; #else // USE_SDL2 case SDL_MOUSEMOTION: -- cgit v1.2.3-70-g09d2