From: notaz Date: Fri, 23 May 2025 21:13:46 +0000 (+0300) Subject: in_sdl: give names to gamepad buttons X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50d625e820f5db49f97124dd3fe2291f31044227;p=libpicofe.git in_sdl: give names to gamepad buttons in control config, etc; otherwise it's just hex codes --- diff --git a/in_sdl.c b/in_sdl.c index 539e6a2..93fe22d 100644 --- a/in_sdl.c +++ b/in_sdl.c @@ -117,6 +117,15 @@ static const char * const in_sdl_keys[SDLK_LAST] = { [SDLK_z] = "z", [SDLK_DELETE] = "delete", + // gamepad buttons + #define B(x) [SDLK_WORLD_##x] = "b"#x + B(0), B(1), B(2), B(3), B(4), B(5), B(6), B(7), + B(8), B(9), B(10), B(11), B(12), B(13), B(14), B(15), + B(16), B(17), B(18), B(19), B(20), B(21), B(22), B(23), + B(24), B(25), B(26), B(27), B(28), B(29), B(30), B(31), + B(32), B(33), B(34), B(35), B(36), B(37), B(38), B(39), + #undef B + [SDLK_KP0] = "[0]", [SDLK_KP1] = "[1]", [SDLK_KP2] = "[2]",