From aa12eaacce661dc38f2bd2cca0308a13fc3d09f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radek=20Krzy=C5=9Bk=C3=B3w?= <46760021+Flower35@users.noreply.github.com> Date: Sat, 2 Nov 2024 22:57:04 +0100 Subject: [PATCH] Use virtual-key names instead of physical-key names in the binds menu (#395) --- src/pc/controller/controller_bind_mapping.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pc/controller/controller_bind_mapping.c b/src/pc/controller/controller_bind_mapping.c index a255e6e4..cbde338f 100644 --- a/src/pc/controller/controller_bind_mapping.c +++ b/src/pc/controller/controller_bind_mapping.c @@ -1,7 +1,7 @@ #include #ifdef HAVE_SDL2 #include -#else +#else #ifdef HAVE_SDL #include @@ -145,7 +145,7 @@ const char* translate_bind_to_name(int bind) { if (sc == 0) { return name; } #ifdef HAVE_SDL2 - const char* sname = SDL_GetScancodeName(sc); + const char* sname = SDL_GetKeyName(SDL_GetKeyFromScancode(sc)); if (strlen(sname) <= 9) { return sname; } char* space = strchr(sname, ' ');