From 1e98e738283ccb81303d29305188ac825ecfcba9 Mon Sep 17 00:00:00 2001
From: spholz <44805808+spholz@users.noreply.github.com>
Date: Thu, 12 Aug 2021 21:32:53 +0200
Subject: configuration: add option to select network interface This commit
renames the "Services" tab to "Network" and adds a combobox that allows the
user to select the network interface that yuzu should use. This new setting
is now used to get the local IP address in Network::GetHostIPv4Address. This
prevents yuzu from selecting the wrong network interface and thus using the
wrong IP address. The return type of Network::GetHostIPv4Adress has also been
changed.
---
src/yuzu/CMakeLists.txt | 6 +-
src/yuzu/configuration/config.cpp | 6 +-
src/yuzu/configuration/config.h | 2 +-
src/yuzu/configuration/configure.ui | 10 +-
src/yuzu/configuration/configure_dialog.cpp | 4 +-
src/yuzu/configuration/configure_network.cpp | 158 +++++++++++++++++++++++++++
src/yuzu/configuration/configure_network.h | 36 ++++++
src/yuzu/configuration/configure_network.ui | 143 ++++++++++++++++++++++++
src/yuzu/configuration/configure_service.cpp | 144 ------------------------
src/yuzu/configuration/configure_service.h | 34 ------
src/yuzu/configuration/configure_service.ui | 124 ---------------------
11 files changed, 352 insertions(+), 315 deletions(-)
create mode 100644 src/yuzu/configuration/configure_network.cpp
create mode 100644 src/yuzu/configuration/configure_network.h
create mode 100644 src/yuzu/configuration/configure_network.ui
delete mode 100644 src/yuzu/configuration/configure_service.cpp
delete mode 100644 src/yuzu/configuration/configure_service.h
delete mode 100644 src/yuzu/configuration/configure_service.ui
(limited to 'src/yuzu')
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index cb4bdcc7e..cf68a95b5 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -102,9 +102,9 @@ add_executable(yuzu
configuration/configure_profile_manager.cpp
configuration/configure_profile_manager.h
configuration/configure_profile_manager.ui
- configuration/configure_service.cpp
- configuration/configure_service.h
- configuration/configure_service.ui
+ configuration/configure_network.cpp
+ configuration/configure_network.h
+ configuration/configure_network.ui
configuration/configure_system.cpp
configuration/configure_system.h
configuration/configure_system.ui
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp
index 380379eb4..377795326 100644
--- a/src/yuzu/configuration/config.cpp
+++ b/src/yuzu/configuration/config.cpp
@@ -692,6 +692,7 @@ void Config::ReadServiceValues() {
qt_config->beginGroup(QStringLiteral("Services"));
ReadBasicSetting(Settings::values.bcat_backend);
ReadBasicSetting(Settings::values.bcat_boxcat_local);
+ ReadBasicSetting(Settings::values.network_interface);
qt_config->endGroup();
}
@@ -1144,7 +1145,7 @@ void Config::SaveValues() {
SaveDataStorageValues();
SaveDebuggingValues();
SaveDisabledAddOnValues();
- SaveServiceValues();
+ SaveNetworkValues();
SaveUIValues();
SaveWebServiceValues();
SaveMiscellaneousValues();
@@ -1238,11 +1239,12 @@ void Config::SaveDebuggingValues() {
qt_config->endGroup();
}
-void Config::SaveServiceValues() {
+void Config::SaveNetworkValues() {
qt_config->beginGroup(QStringLiteral("Services"));
WriteBasicSetting(Settings::values.bcat_backend);
WriteBasicSetting(Settings::values.bcat_boxcat_local);
+ WriteBasicSetting(Settings::values.network_interface);
qt_config->endGroup();
}
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h
index c1d7feb9f..9555f4498 100644
--- a/src/yuzu/configuration/config.h
+++ b/src/yuzu/configuration/config.h
@@ -88,7 +88,7 @@ private:
void SaveCoreValues();
void SaveDataStorageValues();
void SaveDebuggingValues();
- void SaveServiceValues();
+ void SaveNetworkValues();
void SaveDisabledAddOnValues();
void SaveMiscellaneousValues();
void SavePathValues();
diff --git a/src/yuzu/configuration/configure.ui b/src/yuzu/configuration/configure.ui
index fca9aed5f..6258dcf20 100644
--- a/src/yuzu/configuration/configure.ui
+++ b/src/yuzu/configuration/configure.ui
@@ -147,12 +147,12 @@
Web
-
+
- Services
+ Network
- Services
+ Network
@@ -242,9 +242,9 @@
1
- ConfigureService
+ ConfigureNetwork
QWidget
- configuration/configure_service.h
+ configuration/configure_network.h
1
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp
index bc009b6b3..fe4186157 100644
--- a/src/yuzu/configuration/configure_dialog.cpp
+++ b/src/yuzu/configuration/configure_dialog.cpp
@@ -67,7 +67,7 @@ void ConfigureDialog::ApplyConfiguration() {
ui->audioTab->ApplyConfiguration();
ui->debugTab->ApplyConfiguration();
ui->webTab->ApplyConfiguration();
- ui->serviceTab->ApplyConfiguration();
+ ui->networkTab->ApplyConfiguration();
Core::System::GetInstance().ApplySettings();
Settings::LogSettings();
}
@@ -103,7 +103,7 @@ Q_DECLARE_METATYPE(QList);
void ConfigureDialog::PopulateSelectionList() {
const std::array>, 6> items{
{{tr("General"), {ui->generalTab, ui->hotkeysTab, ui->uiTab, ui->webTab, ui->debugTab}},
- {tr("System"), {ui->systemTab, ui->profileManagerTab, ui->serviceTab, ui->filesystemTab}},
+ {tr("System"), {ui->systemTab, ui->profileManagerTab, ui->networkTab, ui->filesystemTab}},
{tr("CPU"), {ui->cpuTab}},
{tr("Graphics"), {ui->graphicsTab, ui->graphicsAdvancedTab}},
{tr("Audio"), {ui->audioTab}},
diff --git a/src/yuzu/configuration/configure_network.cpp b/src/yuzu/configuration/configure_network.cpp
new file mode 100644
index 000000000..9787d4f1b
--- /dev/null
+++ b/src/yuzu/configuration/configure_network.cpp
@@ -0,0 +1,158 @@
+// Copyright 2019 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#include
+#include
+#include "common/settings.h"
+#include "core/core.h"
+#include "core/hle/service/bcat/backend/boxcat.h"
+#include "ui_configure_network.h"
+#include "yuzu/configuration/configure_network.h"
+
+#ifdef YUZU_ENABLE_BOXCAT
+namespace {
+QString FormatEventStatusString(const Service::BCAT::EventStatus& status) {
+ QString out;
+
+ if (status.header.has_value()) {
+ out += QStringLiteral("%1
").arg(QString::fromStdString(*status.header));
+ }
+
+ if (status.events.size() == 1) {
+ out += QStringLiteral("%1
").arg(QString::fromStdString(status.events.front()));
+ } else {
+ for (const auto& event : status.events) {
+ out += QStringLiteral("- %1
").arg(QString::fromStdString(event));
+ }
+ }
+
+ if (status.footer.has_value()) {
+ out += QStringLiteral("%1
").arg(QString::fromStdString(*status.footer));
+ }
+
+ return out;
+}
+} // Anonymous namespace
+#endif
+
+ConfigureNetwork::ConfigureNetwork(QWidget* parent)
+ : QWidget(parent), ui(std::make_unique()) {
+ ui->setupUi(this);
+
+ ui->bcat_source->addItem(QStringLiteral("None"));
+ ui->bcat_empty_label->setHidden(true);
+ ui->bcat_empty_header->setHidden(true);
+
+#ifdef YUZU_ENABLE_BOXCAT
+ ui->bcat_source->addItem(QStringLiteral("Boxcat"), QStringLiteral("boxcat"));
+#endif
+
+ ui->network_interface->addItem(QStringLiteral("None"));
+ for (const auto& interface : Network::GetAvailableNetworkInterfaces()) {
+ ui->network_interface->addItem(QString::fromStdString(interface.name));
+ }
+
+ connect(ui->bcat_source, QOverload::of(&QComboBox::currentIndexChanged), this,
+ &ConfigureNetwork::OnBCATImplChanged);
+
+ this->SetConfiguration();
+}
+
+ConfigureNetwork::~ConfigureNetwork() = default;
+
+void ConfigureNetwork::ApplyConfiguration() {
+ Settings::values.bcat_backend = ui->bcat_source->currentText().toLower().toStdString();
+ Settings::values.network_interface = ui->network_interface->currentText().toStdString();
+}
+
+void ConfigureNetwork::RetranslateUi() {
+ ui->retranslateUi(this);
+}
+
+void ConfigureNetwork::SetConfiguration() {
+ const bool runtime_lock = !Core::System::GetInstance().IsPoweredOn();
+
+ const int index =
+ ui->bcat_source->findData(QString::fromStdString(Settings::values.bcat_backend.GetValue()));
+ ui->bcat_source->setCurrentIndex(index == -1 ? 0 : index);
+
+ const std::string& network_interface = Settings::values.network_interface.GetValue();
+
+ ui->network_interface->setCurrentText(QString::fromStdString(network_interface));
+ ui->network_interface->setEnabled(runtime_lock);
+}
+
+std::pair ConfigureNetwork::BCATDownloadEvents() {
+#ifdef YUZU_ENABLE_BOXCAT
+ std::optional global;
+ std::map map;
+ const auto res = Service::BCAT::Boxcat::GetStatus(global, map);
+
+ switch (res) {
+ case Service::BCAT::Boxcat::StatusResult::Success:
+ break;
+ case Service::BCAT::Boxcat::StatusResult::Offline:
+ return {QString{},
+ tr("The boxcat service is offline or you are not connected to the internet.")};
+ case Service::BCAT::Boxcat::StatusResult::ParseError:
+ return {QString{},
+ tr("There was an error while processing the boxcat event data. Contact the yuzu "
+ "developers.")};
+ case Service::BCAT::Boxcat::StatusResult::BadClientVersion:
+ return {QString{},
+ tr("The version of yuzu you are using is either too new or too old for the server. "
+ "Try updating to the latest official release of yuzu.")};
+ }
+
+ if (map.empty()) {
+ return {QStringLiteral("Current Boxcat Events"),
+ tr("There are currently no events on boxcat.")};
+ }
+
+ QString out;
+
+ if (global.has_value()) {
+ out += QStringLiteral("%1
").arg(QString::fromStdString(*global));
+ }
+
+ for (const auto& [key, value] : map) {
+ out += QStringLiteral("%1%2
%3")
+ .arg(out.isEmpty() ? QString{} : QStringLiteral("
"))
+ .arg(QString::fromStdString(key))
+ .arg(FormatEventStatusString(value));
+ }
+ return {tr("Current Boxcat Events"), std::move(out)};
+#else
+ return {tr("Current Boxcat Events"), tr("There are currently no events on boxcat.")};
+#endif
+}
+
+void ConfigureNetwork::OnBCATImplChanged() {
+#ifdef YUZU_ENABLE_BOXCAT
+ const auto boxcat = ui->bcat_source->currentText() == QStringLiteral("Boxcat");
+ ui->bcat_empty_header->setHidden(!boxcat);
+ ui->bcat_empty_label->setHidden(!boxcat);
+ ui->bcat_empty_header->setText(QString{});
+ ui->bcat_empty_label->setText(tr("Yuzu is retrieving the latest boxcat status..."));
+
+ if (!boxcat)
+ return;
+
+ const auto future = QtConcurrent::run([this] { return BCATDownloadEvents(); });
+
+ watcher.setFuture(future);
+ connect(&watcher, &QFutureWatcher>::finished, this,
+ [this] { OnUpdateBCATEmptyLabel(watcher.result()); });
+#endif
+}
+
+void ConfigureNetwork::OnUpdateBCATEmptyLabel(std::pair string) {
+#ifdef YUZU_ENABLE_BOXCAT
+ const auto boxcat = ui->bcat_source->currentText() == QStringLiteral("Boxcat");
+ if (boxcat) {
+ ui->bcat_empty_header->setText(string.first);
+ ui->bcat_empty_label->setText(string.second);
+ }
+#endif
+}
diff --git a/src/yuzu/configuration/configure_network.h b/src/yuzu/configuration/configure_network.h
new file mode 100644
index 000000000..d4ef33fbf
--- /dev/null
+++ b/src/yuzu/configuration/configure_network.h
@@ -0,0 +1,36 @@
+// Copyright 2019 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include
+#include
+#include
+
+#include "core/network/network_interface.h"
+
+namespace Ui {
+class ConfigureNetwork;
+}
+
+class ConfigureNetwork : public QWidget {
+ Q_OBJECT
+
+public:
+ explicit ConfigureNetwork(QWidget* parent = nullptr);
+ ~ConfigureNetwork() override;
+
+ void ApplyConfiguration();
+ void RetranslateUi();
+
+private:
+ void SetConfiguration();
+
+ std::pair BCATDownloadEvents();
+ void OnBCATImplChanged();
+ void OnUpdateBCATEmptyLabel(std::pair string);
+
+ std::unique_ptr ui;
+ QFutureWatcher> watcher{this};
+};
diff --git a/src/yuzu/configuration/configure_network.ui b/src/yuzu/configuration/configure_network.ui
new file mode 100644
index 000000000..5f9b7e97b
--- /dev/null
+++ b/src/yuzu/configuration/configure_network.ui
@@ -0,0 +1,143 @@
+
+
+ ConfigureNetwork
+
+
+
+ 0
+ 0
+ 433
+ 561
+
+
+
+ Form
+
+
+ -
+
+
-
+
+
+ General
+
+
+
-
+
+
+ -
+
+
+ Network Interface
+
+
+
+
+
+
+ -
+
+
+ BCAT
+
+
+
-
+
+
+
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+ -
+
+
+
+ 16777215
+ 16777215
+
+
+
+ BCAT Backend
+
+
+
+ -
+
+
+
+ 260
+ 16777215
+
+
+
+ BCAT is Nintendo's way of sending data to games to engage its community and unlock additional content.
+
+
+ true
+
+
+
+ -
+
+
+ <html><head/><body><p><a href="https://yuzu-emu.org/help/feature/boxcat"><span style=" text-decoration: underline; color:#0000ff;">Learn more about BCAT, Boxcat, and Current Events</span></a></p></body></html>
+
+
+ true
+
+
+
+ -
+
+
+ -
+
+
+ true
+
+
+
+ 260
+ 16777215
+
+
+
+
+
+
+ Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
+
+
+ true
+
+
+
+
+
+
+
+
+ -
+
+
+ Qt::Vertical
+
+
+
+ 20
+ 40
+
+
+
+
+
+
+
+
+
diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp
deleted file mode 100644
index 4aa424803..000000000
--- a/src/yuzu/configuration/configure_service.cpp
+++ /dev/null
@@ -1,144 +0,0 @@
-// Copyright 2019 yuzu Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#include
-#include
-#include "common/settings.h"
-#include "core/hle/service/bcat/backend/boxcat.h"
-#include "ui_configure_service.h"
-#include "yuzu/configuration/configure_service.h"
-
-#ifdef YUZU_ENABLE_BOXCAT
-namespace {
-QString FormatEventStatusString(const Service::BCAT::EventStatus& status) {
- QString out;
-
- if (status.header.has_value()) {
- out += QStringLiteral("%1
").arg(QString::fromStdString(*status.header));
- }
-
- if (status.events.size() == 1) {
- out += QStringLiteral("%1
").arg(QString::fromStdString(status.events.front()));
- } else {
- for (const auto& event : status.events) {
- out += QStringLiteral("- %1
").arg(QString::fromStdString(event));
- }
- }
-
- if (status.footer.has_value()) {
- out += QStringLiteral("%1
").arg(QString::fromStdString(*status.footer));
- }
-
- return out;
-}
-} // Anonymous namespace
-#endif
-
-ConfigureService::ConfigureService(QWidget* parent)
- : QWidget(parent), ui(std::make_unique()) {
- ui->setupUi(this);
-
- ui->bcat_source->addItem(QStringLiteral("None"));
- ui->bcat_empty_label->setHidden(true);
- ui->bcat_empty_header->setHidden(true);
-
-#ifdef YUZU_ENABLE_BOXCAT
- ui->bcat_source->addItem(QStringLiteral("Boxcat"), QStringLiteral("boxcat"));
-#endif
-
- connect(ui->bcat_source, QOverload::of(&QComboBox::currentIndexChanged), this,
- &ConfigureService::OnBCATImplChanged);
-
- this->SetConfiguration();
-}
-
-ConfigureService::~ConfigureService() = default;
-
-void ConfigureService::ApplyConfiguration() {
- Settings::values.bcat_backend = ui->bcat_source->currentText().toLower().toStdString();
-}
-
-void ConfigureService::RetranslateUi() {
- ui->retranslateUi(this);
-}
-
-void ConfigureService::SetConfiguration() {
- const int index =
- ui->bcat_source->findData(QString::fromStdString(Settings::values.bcat_backend.GetValue()));
- ui->bcat_source->setCurrentIndex(index == -1 ? 0 : index);
-}
-
-std::pair ConfigureService::BCATDownloadEvents() {
-#ifdef YUZU_ENABLE_BOXCAT
- std::optional global;
- std::map map;
- const auto res = Service::BCAT::Boxcat::GetStatus(global, map);
-
- switch (res) {
- case Service::BCAT::Boxcat::StatusResult::Success:
- break;
- case Service::BCAT::Boxcat::StatusResult::Offline:
- return {QString{},
- tr("The boxcat service is offline or you are not connected to the internet.")};
- case Service::BCAT::Boxcat::StatusResult::ParseError:
- return {QString{},
- tr("There was an error while processing the boxcat event data. Contact the yuzu "
- "developers.")};
- case Service::BCAT::Boxcat::StatusResult::BadClientVersion:
- return {QString{},
- tr("The version of yuzu you are using is either too new or too old for the server. "
- "Try updating to the latest official release of yuzu.")};
- }
-
- if (map.empty()) {
- return {QStringLiteral("Current Boxcat Events"),
- tr("There are currently no events on boxcat.")};
- }
-
- QString out;
-
- if (global.has_value()) {
- out += QStringLiteral("%1
").arg(QString::fromStdString(*global));
- }
-
- for (const auto& [key, value] : map) {
- out += QStringLiteral("%1%2
%3")
- .arg(out.isEmpty() ? QString{} : QStringLiteral("
"))
- .arg(QString::fromStdString(key))
- .arg(FormatEventStatusString(value));
- }
- return {tr("Current Boxcat Events"), std::move(out)};
-#else
- return {tr("Current Boxcat Events"), tr("There are currently no events on boxcat.")};
-#endif
-}
-
-void ConfigureService::OnBCATImplChanged() {
-#ifdef YUZU_ENABLE_BOXCAT
- const auto boxcat = ui->bcat_source->currentText() == QStringLiteral("Boxcat");
- ui->bcat_empty_header->setHidden(!boxcat);
- ui->bcat_empty_label->setHidden(!boxcat);
- ui->bcat_empty_header->setText(QString{});
- ui->bcat_empty_label->setText(tr("Yuzu is retrieving the latest boxcat status..."));
-
- if (!boxcat)
- return;
-
- const auto future = QtConcurrent::run([this] { return BCATDownloadEvents(); });
-
- watcher.setFuture(future);
- connect(&watcher, &QFutureWatcher>::finished, this,
- [this] { OnUpdateBCATEmptyLabel(watcher.result()); });
-#endif
-}
-
-void ConfigureService::OnUpdateBCATEmptyLabel(std::pair string) {
-#ifdef YUZU_ENABLE_BOXCAT
- const auto boxcat = ui->bcat_source->currentText() == QStringLiteral("Boxcat");
- if (boxcat) {
- ui->bcat_empty_header->setText(string.first);
- ui->bcat_empty_label->setText(string.second);
- }
-#endif
-}
diff --git a/src/yuzu/configuration/configure_service.h b/src/yuzu/configuration/configure_service.h
deleted file mode 100644
index f5c1b703a..000000000
--- a/src/yuzu/configuration/configure_service.h
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright 2019 yuzu Emulator Project
-// Licensed under GPLv2 or any later version
-// Refer to the license.txt file included.
-
-#pragma once
-
-#include
-#include
-#include
-
-namespace Ui {
-class ConfigureService;
-}
-
-class ConfigureService : public QWidget {
- Q_OBJECT
-
-public:
- explicit ConfigureService(QWidget* parent = nullptr);
- ~ConfigureService() override;
-
- void ApplyConfiguration();
- void RetranslateUi();
-
-private:
- void SetConfiguration();
-
- std::pair BCATDownloadEvents();
- void OnBCATImplChanged();
- void OnUpdateBCATEmptyLabel(std::pair string);
-
- std::unique_ptr ui;
- QFutureWatcher> watcher{this};
-};
diff --git a/src/yuzu/configuration/configure_service.ui b/src/yuzu/configuration/configure_service.ui
deleted file mode 100644
index 9668dd557..000000000
--- a/src/yuzu/configuration/configure_service.ui
+++ /dev/null
@@ -1,124 +0,0 @@
-
-
- ConfigureService
-
-
-
- 0
- 0
- 433
- 561
-
-
-
- Form
-
-
- -
-
-
-
-
-
- BCAT
-
-
-
-
-
-
-
- 260
- 16777215
-
-
-
- BCAT is Nintendo's way of sending data to games to engage its community and unlock additional content.
-
-
- true
-
-
-
- -
-
-
-
- 16777215
- 16777215
-
-
-
- BCAT Backend
-
-
-
- -
-
-
- true
-
-
-
- 260
- 16777215
-
-
-
-
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
- true
-
-
-
- -
-
-
- <html><head/><body><p><a href="https://yuzu-emu.org/help/feature/boxcat"><span style=" text-decoration: underline; color:#0000ff;">Learn more about BCAT, Boxcat, and Current Events</span></a></p></body></html>
-
-
- true
-
-
-
- -
-
-
- -
-
-
-
-
-
- Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop
-
-
- true
-
-
-
-
-
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
-
-
--
cgit v1.2.3
From 04ec426201ff8706f94f784cbb542298e5f6daa7 Mon Sep 17 00:00:00 2001
From: Sönke Holz
Date: Fri, 13 Aug 2021 00:34:04 +0200
Subject: configuration: use tr instead of QStringLiteral for "None" item in
network interface combobox
---
src/yuzu/configuration/configure_network.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
(limited to 'src/yuzu')
diff --git a/src/yuzu/configuration/configure_network.cpp b/src/yuzu/configuration/configure_network.cpp
index 9787d4f1b..3716967f6 100644
--- a/src/yuzu/configuration/configure_network.cpp
+++ b/src/yuzu/configuration/configure_network.cpp
@@ -48,7 +48,7 @@ ConfigureNetwork::ConfigureNetwork(QWidget* parent)
ui->bcat_source->addItem(QStringLiteral("Boxcat"), QStringLiteral("boxcat"));
#endif
- ui->network_interface->addItem(QStringLiteral("None"));
+ ui->network_interface->addItem(tr("None"));
for (const auto& interface : Network::GetAvailableNetworkInterfaces()) {
ui->network_interface->addItem(QString::fromStdString(interface.name));
}
--
cgit v1.2.3
From 0476751ee2123f7ef1abc60c6530f3840a525f24 Mon Sep 17 00:00:00 2001
From: Sönke Holz
Date: Fri, 13 Aug 2021 02:48:39 +0200
Subject: configuration: move network_interface include to source file
---
src/yuzu/configuration/configure_network.cpp | 1 +
src/yuzu/configuration/configure_network.h | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)
(limited to 'src/yuzu')
diff --git a/src/yuzu/configuration/configure_network.cpp b/src/yuzu/configuration/configure_network.cpp
index 3716967f6..e6924883c 100644
--- a/src/yuzu/configuration/configure_network.cpp
+++ b/src/yuzu/configuration/configure_network.cpp
@@ -7,6 +7,7 @@
#include "common/settings.h"
#include "core/core.h"
#include "core/hle/service/bcat/backend/boxcat.h"
+#include "core/network/network_interface.h"
#include "ui_configure_network.h"
#include "yuzu/configuration/configure_network.h"
diff --git a/src/yuzu/configuration/configure_network.h b/src/yuzu/configuration/configure_network.h
index d4ef33fbf..442b68e6b 100644
--- a/src/yuzu/configuration/configure_network.h
+++ b/src/yuzu/configuration/configure_network.h
@@ -8,8 +8,6 @@
#include
#include
-#include "core/network/network_interface.h"
-
namespace Ui {
class ConfigureNetwork;
}
--
cgit v1.2.3
From 068c66672dd8314693f5f5ee29941dce1973b405 Mon Sep 17 00:00:00 2001
From: Sönke Holz
Date: Fri, 13 Aug 2021 12:39:14 +0200
Subject: configuration: fix mingw-w64 build
---
src/yuzu/configuration/configure_network.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
(limited to 'src/yuzu')
diff --git a/src/yuzu/configuration/configure_network.cpp b/src/yuzu/configuration/configure_network.cpp
index e6924883c..ae22f1018 100644
--- a/src/yuzu/configuration/configure_network.cpp
+++ b/src/yuzu/configuration/configure_network.cpp
@@ -50,8 +50,8 @@ ConfigureNetwork::ConfigureNetwork(QWidget* parent)
#endif
ui->network_interface->addItem(tr("None"));
- for (const auto& interface : Network::GetAvailableNetworkInterfaces()) {
- ui->network_interface->addItem(QString::fromStdString(interface.name));
+ for (const auto& iface : Network::GetAvailableNetworkInterfaces()) {
+ ui->network_interface->addItem(QString::fromStdString(iface.name));
}
connect(ui->bcat_source, QOverload::of(&QComboBox::currentIndexChanged), this,
--
cgit v1.2.3