We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 98f7936 commit de3596eCopy full SHA for de3596e
src/Keybinds.cpp
@@ -42,7 +42,10 @@ std::string keybinds::keyToString(enumKeyCodes key) {
42
case CONTROLLER_RTHUMBSTICK_DOWN: return "L_THUMBSTICK_DOWN";
43
case CONTROLLER_RTHUMBSTICK_UP: return "L_THUMBSTICK_UP";
44
case static_cast<enumKeyCodes>(-1): return "Unk";
45
- default: return CCKeyboardDispatcher::get()->keyToString(key);
+ default: {
46
+ auto s = CCKeyboardDispatcher::get()->keyToString(key);
47
+ return (s != nullptr) ? s : "Unk";
48
+ }
49
}
50
51
0 commit comments