Add keyboard and gamepad shortcuts for control panel
This commit is contained in:
parent
8a7be971a4
commit
3767a9eac3
4 changed files with 27 additions and 0 deletions
|
|
@ -443,6 +443,19 @@ void SdlInputHandler::handleControllerButtonEvent(SDL_ControllerButtonEvent* eve
|
|||
return;
|
||||
}
|
||||
|
||||
if (state->buttons == (BACK_FLAG | LB_FLAG | RB_FLAG | B_FLAG)) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Detected control panel toggle gamepad combo");
|
||||
|
||||
Session::get()->toggleControlPanelVisibility();
|
||||
|
||||
if (isGamepadInputAllowed()) {
|
||||
LiSendMultiControllerEvent(state->index, m_GamepadMask,
|
||||
0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (state->buttons == (BACK_FLAG | LB_FLAG | RB_FLAG | Y_FLAG)) {
|
||||
SDL_LogInfo(SDL_LOG_CATEGORY_APPLICATION,
|
||||
"Detected keyboard/mouse input toggle gamepad combo");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue