mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-04-22 04:24:44 +00:00
fix lint
This commit is contained in:
parent
77927bf9fd
commit
1229c03272
2 changed files with 6 additions and 3 deletions
|
@ -167,7 +167,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||
QString data = ui->backButtonBehaviorComboBox->itemData(index).toString();
|
||||
Config::setBackButtonBehavior(data.toStdString());
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
// GPU TAB
|
||||
|
|
|
@ -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
Reference in a new issue