mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-08-04 08:22:32 +00:00
fix lint
This commit is contained in:
parent
77927bf9fd
commit
1229c03272
@ -167,7 +167,7 @@ SettingsDialog::SettingsDialog(std::span<const QString> physical_devices, QWidge
|
|||||||
QString data = ui->backButtonBehaviorComboBox->itemData(index).toString();
|
QString data = ui->backButtonBehaviorComboBox->itemData(index).toString();
|
||||||
Config::setBackButtonBehavior(data.toStdString());
|
Config::setBackButtonBehavior(data.toStdString());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// GPU TAB
|
// GPU TAB
|
||||||
|
@ -333,10 +333,13 @@ void WindowSDL::onGamepadEvent(const SDL_Event* event) {
|
|||||||
if (event->gbutton.button == SDL_GAMEPAD_BUTTON_BACK) {
|
if (event->gbutton.button == SDL_GAMEPAD_BUTTON_BACK) {
|
||||||
std::string backButtonBehavior = Config::getBackButtonBehavior();
|
std::string backButtonBehavior = Config::getBackButtonBehavior();
|
||||||
if (backButtonBehavior != "none") {
|
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
|
// trigger a touchpad event so that the touchpad emulation for back button works
|
||||||
controller->SetTouchpadState(0, true, x, 0.5f);
|
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 {
|
} else {
|
||||||
controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN);
|
controller->CheckButton(0, button, event->type == SDL_EVENT_GAMEPAD_BUTTON_DOWN);
|
||||||
|
Loading…
Reference in New Issue
Block a user