diff options
author | 2023-01-13 03:20:57 +1100 | |
---|---|---|
committer | 2023-01-13 03:20:57 +1100 | |
commit | d3b9bbba6f08cdbb7787004002bdbe58637be396 (patch) | |
tree | acce01bd9efad829d96518fcfef8d951ab6a7924 /src/osd/modules/input/input_sdl.cpp | |
parent | e2620b62306faf86f37e542aa299aceae047328e (diff) |
osd: Include mapping string in verbose output when enumerating SDL game controllers.
Diffstat (limited to 'src/osd/modules/input/input_sdl.cpp')
-rw-r--r-- | src/osd/modules/input/input_sdl.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/osd/modules/input/input_sdl.cpp b/src/osd/modules/input/input_sdl.cpp index 94b904d0cf8..fb7b3448de5 100644 --- a/src/osd/modules/input/input_sdl.cpp +++ b/src/osd/modules/input/input_sdl.cpp @@ -1850,6 +1850,16 @@ public: SDL_GameControllerGetProduct(ctrl), SDL_GameControllerGetProductVersion(ctrl), serial ? serial : "<nullptr>"); + char *const mapping = SDL_GameControllerMapping(ctrl); + if (mapping) + { + osd_printf_verbose("Game Controller: ... mapping [%s]\n", mapping); + SDL_free(mapping); + } + else + { + osd_printf_verbose("Game Controller: ... no mapping\n"); + } devinfo->configure(); } @@ -1862,7 +1872,7 @@ public: sdl_event_manager::instance().subscribe(event_types, this); - osd_printf_verbose("Joystick: End initialization\n"); + osd_printf_verbose("Game Controller: End initialization\n"); } virtual void handle_event(SDL_Event &sdlevent) override |