mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-01 14:59:13 +00:00
[qt] remove 'None' interface since net code already uses first avail interface anyways, disable changing ifaces at runtime (#3683)
Signed-off-by: lizzie <[email protected]> Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3683 Reviewed-by: DraVee <[email protected]> Reviewed-by: crueter <[email protected]> Co-authored-by: lizzie <[email protected]> Co-committed-by: lizzie <[email protected]>
This commit is contained in:
1 parent
0a169dec4d
commit
1864160326
1 file changed
+8
-13
@@ -1,4 +1,4 @@
|
||||
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
|
||||
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
|
||||
@@ -12,14 +12,13 @@
|
||||
#include "yuzu/configuration/configure_network.h"
|
||||
|
||||
ConfigureNetwork::ConfigureNetwork(const Core::System& system_, QWidget* parent)
|
||||
: QWidget(parent), ui(std::make_unique<Ui::ConfigureNetwork>()), system{system_} {
|
||||
: QWidget(parent)
|
||||
, ui(std::make_unique<Ui::ConfigureNetwork>())
|
||||
, system{system_}
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
ui->network_interface->addItem(tr("None"));
|
||||
for (const auto& iface : Network::GetAvailableNetworkInterfaces()) {
|
||||
for (const auto& iface : Network::GetAvailableNetworkInterfaces())
|
||||
ui->network_interface->addItem(QString::fromStdString(iface.name));
|
||||
}
|
||||
|
||||
this->SetConfiguration();
|
||||
}
|
||||
|
||||
@@ -44,13 +43,9 @@ void ConfigureNetwork::RetranslateUI() {
|
||||
|
||||
void ConfigureNetwork::SetConfiguration() {
|
||||
const bool runtime_lock = !system.IsPoweredOn();
|
||||
|
||||
const std::string& network_interface = Settings::values.network_interface.GetValue();
|
||||
const bool& airplane_mode = Settings::values.airplane_mode.GetValue();
|
||||
|
||||
auto const network_interface = Settings::values.network_interface.GetValue();
|
||||
auto const airplane_mode = Settings::values.airplane_mode.GetValue();
|
||||
ui->network_interface->setCurrentText(QString::fromStdString(network_interface));
|
||||
ui->network_interface->setEnabled(runtime_lock);
|
||||
|
||||
ui->airplane_mode->setChecked(airplane_mode);
|
||||
ui->network_interface->setEnabled(true);
|
||||
}
|
||||
Reference in new issue
Block a user