Fix glfw dependency different version

This commit is contained in:
Bruno Herbelin
2022-03-15 22:15:18 +01:00
parent b710750035
commit 667ea9fa64

View File

@@ -938,12 +938,14 @@ std::string Control::inputLabel(uint id)
} }
else if ( id >= INPUT_NUMPAD_FIRST && id <= INPUT_NUMPAD_LAST ) else if ( id >= INPUT_NUMPAD_FIRST && id <= INPUT_NUMPAD_LAST )
{ {
int k = GLFW_KEY_KP_0 + id -INPUT_NUMPAD_FIRST; static std::vector< std::string > pad_labels = { "0", "1", "2", "3", "4", "5",
label = std::string( glfwGetKeyName( k, glfwGetKeyScancode(k) ) ); "6", "7", "8", "9", ".", "/", "*", "-", "+"
};
label = pad_labels[id -INPUT_NUMPAD_FIRST];
} }
else if ( id >= INPUT_JOYSTICK_FIRST && id <= INPUT_JOYSTICK_LAST ) else if ( id >= INPUT_JOYSTICK_FIRST && id <= INPUT_JOYSTICK_LAST )
{ {
std::vector< std::string > joystick_labels = { "Button A", "Button B", "Button X", "Button Y", static std::vector< std::string > joystick_labels = { "Button A", "Button B", "Button X", "Button Y",
"Left bumper", "Right bumper", "Back", "Start", "Left bumper", "Right bumper", "Back", "Start",
"Guide", "Left thumb", "Right thumb", "Guide", "Left thumb", "Right thumb",
"Up", "Right", "Down", "Left", "Up", "Right", "Down", "Left",