Add Airplane Mode + Host Network Interface Details (#204)

Adds Airplane Mode function to settings, host states, etc.
Windows implemented only for now.

Closes #203

Co-authored-by: crueter <swurl@swurl.xyz>
Co-authored-by: Aleksandr Popovich <alekpopo@pm.me>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/204
Co-authored-by: Maufeat <sahyno1996@gmail.com>
Co-committed-by: Maufeat <sahyno1996@gmail.com>
This commit is contained in:
Maufeat 2025-06-26 18:55:34 +00:00 committed by crueter
parent b2e602325c
commit 2e6a289a0b
34 changed files with 1193 additions and 203 deletions

View file

@ -1,3 +1,6 @@
// SPDX-FileCopyrightText: Copyright 2025 Eden Emulator Project
// SPDX-License-Identifier: GPL-3.0-or-later
// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
@ -24,6 +27,7 @@ ConfigureNetwork::~ConfigureNetwork() = default;
void ConfigureNetwork::ApplyConfiguration() {
Settings::values.network_interface = ui->network_interface->currentText().toStdString();
Settings::values.airplane_mode = ui->airplane_mode->isChecked();
}
void ConfigureNetwork::changeEvent(QEvent* event) {
@ -42,7 +46,11 @@ 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();
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);
}

View file

@ -35,6 +35,13 @@
</property>
</widget>
</item>
<item row="2" column="0" colspan="2">
<widget class="QCheckBox" name="airplane_mode">
<property name="text">
<string>Enable Airplane Mode</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
@ -43,7 +50,7 @@
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Orientation::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>