mirror of
https://github.com/coop-deluxe/sm64coopdx.git
synced 2026-05-10 19:01:46 +00:00
Use virtual-key names instead of physical-key names in the binds menu (#395)
This commit is contained in:
parent
93cbf480b6
commit
aa12eaacce
1 changed files with 2 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#else
|
#else
|
||||||
#ifdef HAVE_SDL
|
#ifdef HAVE_SDL
|
||||||
|
|
||||||
#include <SDL/SDL.h>
|
#include <SDL/SDL.h>
|
||||||
|
|
@ -145,7 +145,7 @@ const char* translate_bind_to_name(int bind) {
|
||||||
if (sc == 0) { return name; }
|
if (sc == 0) { return name; }
|
||||||
|
|
||||||
#ifdef HAVE_SDL2
|
#ifdef HAVE_SDL2
|
||||||
const char* sname = SDL_GetScancodeName(sc);
|
const char* sname = SDL_GetKeyName(SDL_GetKeyFromScancode(sc));
|
||||||
if (strlen(sname) <= 9) { return sname; }
|
if (strlen(sname) <= 9) { return sname; }
|
||||||
|
|
||||||
char* space = strchr(sname, ' ');
|
char* space = strchr(sname, ' ');
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue