Use virtual-key names instead of physical-key names in the binds menu (#395)

This commit is contained in:
Radek Krzyśków 2024-11-02 22:57:04 +01:00 committed by GitHub
parent 93cbf480b6
commit aa12eaacce
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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, ' ');