mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-25 19:10:07 +00:00
Merge pull request #4255 from lioncash/copy
configure_graphics: Prevent unnecessary string copies in UpdateDeviceComboBox()
This commit is contained in:
commit
9c2773409a
@ -28,9 +28,9 @@ ConfigureGraphics::ConfigureGraphics(QWidget* parent)
|
|||||||
|
|
||||||
SetConfiguration();
|
SetConfiguration();
|
||||||
|
|
||||||
connect(ui->api, static_cast<void (QComboBox::*)(int)>(&QComboBox::currentIndexChanged), this,
|
connect(ui->api, qOverload<int>(&QComboBox::currentIndexChanged), this,
|
||||||
[this] { UpdateDeviceComboBox(); });
|
[this] { UpdateDeviceComboBox(); });
|
||||||
connect(ui->device, static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
|
connect(ui->device, qOverload<int>(&QComboBox::activated), this,
|
||||||
[this](int device) { UpdateDeviceSelection(device); });
|
[this](int device) { UpdateDeviceSelection(device); });
|
||||||
|
|
||||||
connect(ui->bg_button, &QPushButton::clicked, this, [this] {
|
connect(ui->bg_button, &QPushButton::clicked, this, [this] {
|
||||||
@ -112,7 +112,7 @@ void ConfigureGraphics::UpdateDeviceComboBox() {
|
|||||||
enabled = false;
|
enabled = false;
|
||||||
break;
|
break;
|
||||||
case Settings::RendererBackend::Vulkan:
|
case Settings::RendererBackend::Vulkan:
|
||||||
for (const auto device : vulkan_devices) {
|
for (const auto& device : vulkan_devices) {
|
||||||
ui->device->addItem(device);
|
ui->device->addItem(device);
|
||||||
}
|
}
|
||||||
ui->device->setCurrentIndex(vulkan_device);
|
ui->device->setCurrentIndex(vulkan_device);
|
||||||
|
Loading…
Reference in New Issue
Block a user