mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Add support for configuring 4 pads.
This commit is contained in:
parent
0c426757cd
commit
666c30c495
5 changed files with 120 additions and 3 deletions
|
@ -49,7 +49,9 @@ uint32 CInputBindingManager::m_buttonDefaultValue[PS2::CControllerInfo::MAX_BUTT
|
|||
const char* CInputBindingManager::m_padPreferenceName[] =
|
||||
{
|
||||
"pad1",
|
||||
"pad2"
|
||||
"pad2",
|
||||
"pad3",
|
||||
"pad4"
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
|
|
@ -25,7 +25,7 @@ public:
|
|||
|
||||
enum
|
||||
{
|
||||
MAX_PADS = 2,
|
||||
MAX_PADS = 4,
|
||||
};
|
||||
|
||||
enum BINDINGTYPE
|
||||
|
|
|
@ -121,7 +121,6 @@ void CSio2::SaveState(Framework::CZipArchiveWriter& archive)
|
|||
|
||||
void CSio2::SetButtonState(unsigned int padNumber, PS2::CControllerInfo::BUTTON button, bool pressed, uint8* ram)
|
||||
{
|
||||
assert(padNumber < MAX_PADS);
|
||||
if(padNumber >= MAX_PADS) return;
|
||||
|
||||
auto& padState = m_padState[padNumber];
|
||||
|
|
|
@ -37,6 +37,8 @@ ControllerConfigDialog::ControllerConfigDialog(CInputBindingManager* inputBindin
|
|||
|
||||
m_padUiElements.push_back({ui->pad1TableView, ui->pad1AnalogSensitivitySlider, ui->pad1AnalogSensitivityValueLabel, ui->pad1hapticFeedbackComboBox});
|
||||
m_padUiElements.push_back({ui->pad2TableView, ui->pad2AnalogSensitivitySlider, ui->pad2AnalogSensitivityValueLabel, ui->pad2hapticFeedbackComboBox});
|
||||
m_padUiElements.push_back({ui->pad3TableView, ui->pad3AnalogSensitivitySlider, ui->pad3AnalogSensitivityValueLabel, ui->pad3hapticFeedbackComboBox});
|
||||
m_padUiElements.push_back({ui->pad4TableView, ui->pad4AnalogSensitivitySlider, ui->pad4AnalogSensitivityValueLabel, ui->pad4hapticFeedbackComboBox});
|
||||
|
||||
auto devices = m_inputManager->GetDevices();
|
||||
for(uint32 padIndex = 0; padIndex < m_padUiElements.size(); padIndex++)
|
||||
|
|
|
@ -165,6 +165,120 @@ QGroupBox::title {
|
|||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Pad 3</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout2">
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Analog Stick Sensitivity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="pad3AnalogSensitivitySlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="pad3AnalogSensitivityValueLabel">
|
||||
<property name="text">
|
||||
<string>1.000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="pad3hapticlabel">
|
||||
<property name="text">
|
||||
<string>Haptic Feedback Device:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="pad3hapticFeedbackComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableView" name="pad3TableView">
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>Pad 4</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout3">
|
||||
<item row="1" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout1_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Analog Stick Sensitivity:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="pad4AnalogSensitivitySlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="pad4AnalogSensitivityValueLabel">
|
||||
<property name="text">
|
||||
<string>1.000</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="pad4hapticlabel">
|
||||
<property name="text">
|
||||
<string>Haptic Feedback Device:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="pad4hapticFeedbackComboBox"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTableView" name="pad4TableView">
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue