mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
ControllerInterface: Add IsHidden function to Control interface.
This commit is contained in:
@ -587,28 +587,25 @@ void IOWindow::UpdateOptionList()
|
||||
if (m_selected_device == nullptr)
|
||||
return;
|
||||
|
||||
const auto add_rows = [this](auto& container) {
|
||||
int row = 0;
|
||||
for (ciface::Core::Device::Control* control : container)
|
||||
{
|
||||
m_option_list->insertRow(row);
|
||||
|
||||
if (control->IsHidden())
|
||||
m_option_list->hideRow(row);
|
||||
|
||||
m_option_list->setItem(row, 0,
|
||||
new QTableWidgetItem(QString::fromStdString(control->GetName())));
|
||||
++row;
|
||||
}
|
||||
};
|
||||
|
||||
if (m_reference->IsInput())
|
||||
{
|
||||
int row = 0;
|
||||
for (const auto* input : m_selected_device->Inputs())
|
||||
{
|
||||
m_option_list->insertRow(row);
|
||||
m_option_list->setItem(row, 0,
|
||||
new QTableWidgetItem(QString::fromStdString(input->GetName())));
|
||||
++row;
|
||||
}
|
||||
}
|
||||
add_rows(m_selected_device->Inputs());
|
||||
else
|
||||
{
|
||||
int row = 0;
|
||||
for (const auto* output : m_selected_device->Outputs())
|
||||
{
|
||||
m_option_list->insertRow(row);
|
||||
m_option_list->setItem(row, 0,
|
||||
new QTableWidgetItem(QString::fromStdString(output->GetName())));
|
||||
++row;
|
||||
}
|
||||
}
|
||||
add_rows(m_selected_device->Outputs());
|
||||
}
|
||||
|
||||
void IOWindow::UpdateDeviceList()
|
||||
|
Reference in New Issue
Block a user