diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-09-14 23:50:06 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-09-14 23:50:06 +0300 |
commit | 37a45b2e957dc645b6430bec4d955c35b46e07f3 (patch) | |
tree | 05847f64766091883e4072b73a64aff103d7d645 /src/eventsmanager.cpp | |
parent | 4b6fed0e29b3495a7c4f054afd0a7a3fd2f4a47b (diff) | |
download | plus-37a45b2e957dc645b6430bec4d955c35b46e07f3.tar.gz plus-37a45b2e957dc645b6430bec4d955c35b46e07f3.tar.bz2 plus-37a45b2e957dc645b6430bec4d955c35b46e07f3.tar.xz plus-37a45b2e957dc645b6430bec4d955c35b46e07f3.zip |
Add logging for joystick add/remove events in SDL 2.
Diffstat (limited to 'src/eventsmanager.cpp')
-rw-r--r-- | src/eventsmanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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: |