1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-08-07 06:40:22 +00:00

Display designated "empty" symbol on key config menu for unbound slots

This commit is contained in:
fgenesis 2017-02-19 03:47:21 +01:00
parent dd4739e9a0
commit 7f20f79d97

View file

@ -109,7 +109,7 @@ std::string getInputCodeToUserString(unsigned int k, size_t joystickID)
// Special case keyboard input: // Special case keyboard input:
// Return key name for current keyboard layout! // Return key name for current keyboard layout!
// It's just confusing to see Y instead of Z with a german keyboard layout... // It's just confusing to see Y instead of Z with a german keyboard layout...
if(k < KEY_MAXARRAY) if(k && k < KEY_MAXARRAY)
{ {
#ifdef BBGE_BUILD_SDL2 #ifdef BBGE_BUILD_SDL2
pretty = SDL_GetScancodeName((SDL_Scancode)k); pretty = SDL_GetScancodeName((SDL_Scancode)k);
@ -142,7 +142,10 @@ std::string getInputCodeToUserString(unsigned int k, size_t joystickID)
} }
std::string s = inputcode2string(k); std::string s = inputcode2string(k);
return s.empty() ? "-" : s; return s.empty() ? "" : s; // Ø •
// Actually, • looks interesting.
// It shows up as a box, presumably because the font doesn't have that character.
// I'll leave this as it is, because those boxes are kinda cool. -- fg
} }
int getStringToInputCode(const std::string& s) int getStringToInputCode(const std::string& s)