mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
EmulatedController: encapsulate default device behind getters/setters
This commit is contained in:
@ -114,7 +114,7 @@ void IOWindow::Update()
|
||||
m_range_spinbox->setValue(m_reference->range * SLIDER_TICK_COUNT);
|
||||
m_range_slider->setValue(m_reference->range * SLIDER_TICK_COUNT);
|
||||
|
||||
m_devq.FromString(m_controller->default_device.ToString());
|
||||
m_devq.FromString(m_controller->GetDefaultDevice().ToString());
|
||||
|
||||
UpdateDeviceList();
|
||||
UpdateOptionList();
|
||||
@ -147,7 +147,7 @@ void IOWindow::AppendSelectedOption(const std::string& prefix)
|
||||
m_expression_text->insertPlainText(
|
||||
QString::fromStdString(prefix) +
|
||||
MappingCommon::GetExpressionForControl(m_option_list->currentItem()->text(), m_devq,
|
||||
m_controller->default_device));
|
||||
m_controller->GetDefaultDevice()));
|
||||
}
|
||||
|
||||
void IOWindow::OnDeviceChanged(const QString& device)
|
||||
@ -237,10 +237,9 @@ void IOWindow::UpdateDeviceList()
|
||||
Core::RunAsCPUThread([&] {
|
||||
g_controller_interface.RefreshDevices();
|
||||
m_controller->UpdateReferences(g_controller_interface);
|
||||
m_controller->UpdateDefaultDevice();
|
||||
|
||||
// Adding default device regardless if it's currently connected or not
|
||||
const auto default_device = m_controller->default_device.ToString();
|
||||
const auto default_device = m_controller->GetDefaultDevice().ToString();
|
||||
|
||||
m_devices_combo->addItem(QString::fromStdString(default_device));
|
||||
|
||||
|
Reference in New Issue
Block a user