core: hid: Split SL and SR buttons
This commit is contained in:
parent
767c4b5a99
commit
ae57a99d7d
13 changed files with 382 additions and 185 deletions
|
@ -322,11 +322,12 @@ ConfigureInputPlayer::ConfigureInputPlayer(QWidget* parent, std::size_t player_i
|
|||
setFocusPolicy(Qt::ClickFocus);
|
||||
|
||||
button_map = {
|
||||
ui->buttonA, ui->buttonB, ui->buttonX, ui->buttonY,
|
||||
ui->buttonLStick, ui->buttonRStick, ui->buttonL, ui->buttonR,
|
||||
ui->buttonZL, ui->buttonZR, ui->buttonPlus, ui->buttonMinus,
|
||||
ui->buttonDpadLeft, ui->buttonDpadUp, ui->buttonDpadRight, ui->buttonDpadDown,
|
||||
ui->buttonSL, ui->buttonSR, ui->buttonHome, ui->buttonScreenshot,
|
||||
ui->buttonA, ui->buttonB, ui->buttonX, ui->buttonY,
|
||||
ui->buttonLStick, ui->buttonRStick, ui->buttonL, ui->buttonR,
|
||||
ui->buttonZL, ui->buttonZR, ui->buttonPlus, ui->buttonMinus,
|
||||
ui->buttonDpadLeft, ui->buttonDpadUp, ui->buttonDpadRight, ui->buttonDpadDown,
|
||||
ui->buttonSLLeft, ui->buttonSRLeft, ui->buttonHome, ui->buttonScreenshot,
|
||||
ui->buttonSLRight, ui->buttonSRRight,
|
||||
};
|
||||
|
||||
analog_map_buttons = {{
|
||||
|
@ -1181,10 +1182,13 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
|||
|
||||
// List of all the widgets that will be hidden by any of the following layouts that need
|
||||
// "unhidden" after the controller type changes
|
||||
const std::array<QWidget*, 11> layout_show = {
|
||||
ui->buttonShoulderButtonsSLSR,
|
||||
const std::array<QWidget*, 14> layout_show = {
|
||||
ui->buttonShoulderButtonsSLSRLeft,
|
||||
ui->buttonShoulderButtonsSLSRRight,
|
||||
ui->horizontalSpacerShoulderButtonsWidget,
|
||||
ui->horizontalSpacerShoulderButtonsWidget2,
|
||||
ui->horizontalSpacerShoulderButtonsWidget3,
|
||||
ui->horizontalSpacerShoulderButtonsWidget4,
|
||||
ui->buttonShoulderButtonsLeft,
|
||||
ui->buttonMiscButtonsMinusScreenshot,
|
||||
ui->bottomLeft,
|
||||
|
@ -1202,16 +1206,19 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
|||
std::vector<QWidget*> layout_hidden;
|
||||
switch (layout) {
|
||||
case Core::HID::NpadStyleIndex::ProController:
|
||||
case Core::HID::NpadStyleIndex::JoyconDual:
|
||||
case Core::HID::NpadStyleIndex::Handheld:
|
||||
layout_hidden = {
|
||||
ui->buttonShoulderButtonsSLSR,
|
||||
ui->buttonShoulderButtonsSLSRLeft,
|
||||
ui->buttonShoulderButtonsSLSRRight,
|
||||
ui->horizontalSpacerShoulderButtonsWidget2,
|
||||
ui->horizontalSpacerShoulderButtonsWidget4,
|
||||
};
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconLeft:
|
||||
layout_hidden = {
|
||||
ui->buttonShoulderButtonsSLSRRight,
|
||||
ui->horizontalSpacerShoulderButtonsWidget2,
|
||||
ui->horizontalSpacerShoulderButtonsWidget3,
|
||||
ui->buttonShoulderButtonsRight,
|
||||
ui->buttonMiscButtonsPlusHome,
|
||||
ui->bottomRight,
|
||||
|
@ -1219,16 +1226,17 @@ void ConfigureInputPlayer::UpdateControllerAvailableButtons() {
|
|||
break;
|
||||
case Core::HID::NpadStyleIndex::JoyconRight:
|
||||
layout_hidden = {
|
||||
ui->horizontalSpacerShoulderButtonsWidget,
|
||||
ui->buttonShoulderButtonsLeft,
|
||||
ui->buttonMiscButtonsMinusScreenshot,
|
||||
ui->bottomLeft,
|
||||
ui->buttonShoulderButtonsSLSRLeft, ui->horizontalSpacerShoulderButtonsWidget,
|
||||
ui->horizontalSpacerShoulderButtonsWidget4, ui->buttonShoulderButtonsLeft,
|
||||
ui->buttonMiscButtonsMinusScreenshot, ui->bottomLeft,
|
||||
};
|
||||
break;
|
||||
case Core::HID::NpadStyleIndex::GameCube:
|
||||
layout_hidden = {
|
||||
ui->buttonShoulderButtonsSLSR,
|
||||
ui->buttonShoulderButtonsSLSRLeft,
|
||||
ui->buttonShoulderButtonsSLSRRight,
|
||||
ui->horizontalSpacerShoulderButtonsWidget2,
|
||||
ui->horizontalSpacerShoulderButtonsWidget4,
|
||||
ui->buttonMiscButtonsMinusGroup,
|
||||
ui->buttonMiscButtonsScreenshotGroup,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue