mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-09-10 06:02:40 +00:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
+4
-2
@@ -1859,11 +1859,12 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
|
||||
system->GetUserChannel().clear();
|
||||
}
|
||||
|
||||
|
||||
system->SetFrontendAppletSet({
|
||||
std::make_unique<QtAmiiboSettings>(*this), // Amiibo Settings
|
||||
std::make_unique<QtAmiiboSettings>(*this), // Amiibo Settings
|
||||
(UISettings::values.controller_applet_disabled.GetValue() == true)
|
||||
? nullptr
|
||||
: std::make_unique<QtControllerSelector>(*this), // Controller Selector
|
||||
: std::make_unique<QtControllerSelector>(*this), // Controller Selector
|
||||
std::make_unique<QtErrorDisplay>(*this), // Error Display
|
||||
nullptr, // Mii Editor
|
||||
nullptr, // Parental Controls
|
||||
@@ -1871,6 +1872,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa
|
||||
std::make_unique<QtProfileSelector>(*this), // Profile Selector
|
||||
std::make_unique<QtSoftwareKeyboard>(*this), // Software Keyboard
|
||||
std::make_unique<QtWebBrowser>(*this), // Web Browser
|
||||
nullptr, // Net Connect
|
||||
});
|
||||
|
||||
/** Game Updates check */
|
||||
|
||||
Reference in New Issue
Block a user