mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-03 06:38:46 +00:00
fix lint
This commit is contained in:
parent
77927bf9fd
commit
1229c03272
2 changed files with 6 additions and 3 deletions
|
@ -333,10 +333,13 @@ void WindowSDL::onGamepadEvent(const SDL_Event* event) {
|
|||
if (event->gbutton.button == SDL_GAMEPAD_BUTTON_BACK) {
|
||||
std::string backButtonBehavior = Config::getBackButtonBehavior();
|
||||
if (backButtonBehavior != "none") {
|
||||
float x = backButtonBehavior == "left" ? 0.25f : (backButtonBehavior == "right" ? 0.75f : 0.5f);
|
||||
float x = backButtonBehavior == "left"
|
||||
? 0.25f
|
||||
: (backButtonBehavior == "right" ? 0.75f : 0.5f);
|
||||
// trigger a touchpad event so that the touchpad emulation for back button works
|
||||
controller->SetTouchpadState(0, true, x, 0.5f);
|
||||
controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN);
|
||||
controller->CheckButton(0, button,
|
||||
event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN);
|
||||
}
|
||||
} else {
|
||||
controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue