summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/bcat/backend/boxcat.cpp11
-rw-r--r--src/yuzu/CMakeLists.txt1
-rw-r--r--src/yuzu/configuration/configure_dialog.cpp4
-rw-r--r--src/yuzu/configuration/configure_service.cpp19
-rw-r--r--src/yuzu/configuration/configure_service.h2
5 files changed, 20 insertions, 17 deletions
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp
index 36eb2c094..e6ee0810b 100644
--- a/src/core/hle/service/bcat/backend/boxcat.cpp
+++ b/src/core/hle/service/bcat/backend/boxcat.cpp
@@ -364,18 +364,17 @@ void SynchronizeInternal(DirectoryGetter dir_getter, TitleIDVersion title,
364 364
365bool Boxcat::Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) { 365bool Boxcat::Synchronize(TitleIDVersion title, ProgressServiceBackend& progress) {
366 is_syncing.exchange(true); 366 is_syncing.exchange(true);
367 std::thread([this, title, &progress] { 367 std::thread([this, title, &progress] { SynchronizeInternal(dir_getter, title, progress); })
368 SynchronizeInternal(dir_getter, title, progress); 368 .detach();
369 }).detach();
370 return true; 369 return true;
371} 370}
372 371
373bool Boxcat::SynchronizeDirectory(TitleIDVersion title, std::string name, 372bool Boxcat::SynchronizeDirectory(TitleIDVersion title, std::string name,
374 ProgressServiceBackend& progress) { 373 ProgressServiceBackend& progress) {
375 is_syncing.exchange(true); 374 is_syncing.exchange(true);
376 std::thread([this, title, name, &progress] { 375 std::thread(
377 SynchronizeInternal(dir_getter, title, progress, name); 376 [this, title, name, &progress] { SynchronizeInternal(dir_getter, title, progress, name); })
378 }).detach(); 377 .detach();
379 return true; 378 return true;
380} 379}
381 380
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt
index fffb20220..ff1c1d985 100644
--- a/src/yuzu/CMakeLists.txt
+++ b/src/yuzu/CMakeLists.txt
@@ -68,6 +68,7 @@ add_executable(yuzu
68 configuration/configure_profile_manager.ui 68 configuration/configure_profile_manager.ui
69 configuration/configure_service.cpp 69 configuration/configure_service.cpp
70 configuration/configure_service.h 70 configuration/configure_service.h
71 configuration/configure_service.ui
71 configuration/configure_system.cpp 72 configuration/configure_system.cpp
72 configuration/configure_system.h 73 configuration/configure_system.h
73 configuration/configure_system.ui 74 configuration/configure_system.ui
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp
index 520b7e193..25b2e1b05 100644
--- a/src/yuzu/configuration/configure_dialog.cpp
+++ b/src/yuzu/configuration/configure_dialog.cpp
@@ -75,7 +75,8 @@ Q_DECLARE_METATYPE(QList<QWidget*>);
75void ConfigureDialog::PopulateSelectionList() { 75void ConfigureDialog::PopulateSelectionList() {
76 const std::array<std::pair<QString, QList<QWidget*>>, 4> items{ 76 const std::array<std::pair<QString, QList<QWidget*>>, 4> items{
77 {{tr("General"), {ui->generalTab, ui->webTab, ui->debugTab, ui->gameListTab}}, 77 {{tr("General"), {ui->generalTab, ui->webTab, ui->debugTab, ui->gameListTab}},
78 {tr("System"), {ui->systemTab, ui->profileManagerTab, ui->filesystemTab, ui->audioTab}}, 78 {tr("System"),
79 {ui->systemTab, ui->profileManagerTab, ui->serviceTab, ui->filesystemTab, ui->audioTab}},
79 {tr("Graphics"), {ui->graphicsTab}}, 80 {tr("Graphics"), {ui->graphicsTab}},
80 {tr("Controls"), {ui->inputTab, ui->hotkeysTab}}}, 81 {tr("Controls"), {ui->inputTab, ui->hotkeysTab}}},
81 }; 82 };
@@ -109,6 +110,7 @@ void ConfigureDialog::UpdateVisibleTabs() {
109 {ui->webTab, tr("Web")}, 110 {ui->webTab, tr("Web")},
110 {ui->gameListTab, tr("Game List")}, 111 {ui->gameListTab, tr("Game List")},
111 {ui->filesystemTab, tr("Filesystem")}, 112 {ui->filesystemTab, tr("Filesystem")},
113 {ui->serviceTab, tr("Services")},
112 }; 114 };
113 115
114 [[maybe_unused]] const QSignalBlocker blocker(ui->tabWidget); 116 [[maybe_unused]] const QSignalBlocker blocker(ui->tabWidget);
diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp
index 86160b479..81c9e933f 100644
--- a/src/yuzu/configuration/configure_service.cpp
+++ b/src/yuzu/configuration/configure_service.cpp
@@ -20,7 +20,7 @@ QString FormatEventStatusString(const Service::BCAT::EventStatus& status) {
20 if (status.events.size() == 1) { 20 if (status.events.size() == 1) {
21 out += QStringLiteral("%1<br>").arg(QString::fromStdString(status.events.front())); 21 out += QStringLiteral("%1<br>").arg(QString::fromStdString(status.events.front()));
22 } else { 22 } else {
23 for (const auto event : status.events) { 23 for (const auto& event : status.events) {
24 out += QStringLiteral("- %1<br>").arg(QString::fromStdString(event)); 24 out += QStringLiteral("- %1<br>").arg(QString::fromStdString(event));
25 } 25 }
26 } 26 }
@@ -34,7 +34,7 @@ QString FormatEventStatusString(const Service::BCAT::EventStatus& status) {
34} // Anonymous namespace 34} // Anonymous namespace
35 35
36ConfigureService::ConfigureService(QWidget* parent) 36ConfigureService::ConfigureService(QWidget* parent)
37 : QWidget(parent), ui(std::make_unique<Ui::ConfigureService>()), watcher(this) { 37 : QWidget(parent), ui(std::make_unique<Ui::ConfigureService>()) {
38 ui->setupUi(this); 38 ui->setupUi(this);
39 39
40 ui->bcat_source->addItem(QStringLiteral("None")); 40 ui->bcat_source->addItem(QStringLiteral("None"));
@@ -62,7 +62,8 @@ void ConfigureService::RetranslateUi() {
62} 62}
63 63
64void ConfigureService::SetConfiguration() { 64void ConfigureService::SetConfiguration() {
65 int index = ui->bcat_source->findData(QString::fromStdString(Settings::values.bcat_backend)); 65 const int index =
66 ui->bcat_source->findData(QString::fromStdString(Settings::values.bcat_backend));
66 ui->bcat_source->setCurrentIndex(index == -1 ? 0 : index); 67 ui->bcat_source->setCurrentIndex(index == -1 ? 0 : index);
67} 68}
68 69
@@ -73,14 +74,14 @@ std::pair<QString, QString> ConfigureService::BCATDownloadEvents() {
73 74
74 switch (res) { 75 switch (res) {
75 case Service::BCAT::Boxcat::StatusResult::Offline: 76 case Service::BCAT::Boxcat::StatusResult::Offline:
76 return {QStringLiteral(""), 77 return {QString{},
77 tr("The boxcat service is offline or you are not connected to the internet.")}; 78 tr("The boxcat service is offline or you are not connected to the internet.")};
78 case Service::BCAT::Boxcat::StatusResult::ParseError: 79 case Service::BCAT::Boxcat::StatusResult::ParseError:
79 return {QStringLiteral(""), 80 return {QString{},
80 tr("There was an error while processing the boxcat event data. Contact the yuzu " 81 tr("There was an error while processing the boxcat event data. Contact the yuzu "
81 "developers.")}; 82 "developers.")};
82 case Service::BCAT::Boxcat::StatusResult::BadClientVersion: 83 case Service::BCAT::Boxcat::StatusResult::BadClientVersion:
83 return {QStringLiteral(""), 84 return {QString{},
84 tr("The version of yuzu you are using is either too new or too old for the server. " 85 tr("The version of yuzu you are using is either too new or too old for the server. "
85 "Try updating to the latest official release of yuzu.")}; 86 "Try updating to the latest official release of yuzu.")};
86 } 87 }
@@ -98,11 +99,11 @@ std::pair<QString, QString> ConfigureService::BCATDownloadEvents() {
98 99
99 for (const auto& [key, value] : map) { 100 for (const auto& [key, value] : map) {
100 out += QStringLiteral("%1<b>%2</b><br>%3") 101 out += QStringLiteral("%1<b>%2</b><br>%3")
101 .arg(out.isEmpty() ? QStringLiteral("") : QStringLiteral("<br>")) 102 .arg(out.isEmpty() ? QString{} : QStringLiteral("<br>"))
102 .arg(QString::fromStdString(key)) 103 .arg(QString::fromStdString(key))
103 .arg(FormatEventStatusString(value)); 104 .arg(FormatEventStatusString(value));
104 } 105 }
105 return {QStringLiteral("Current Boxcat Events"), out}; 106 return {QStringLiteral("Current Boxcat Events"), std::move(out)};
106} 107}
107 108
108void ConfigureService::OnBCATImplChanged() { 109void ConfigureService::OnBCATImplChanged() {
@@ -110,7 +111,7 @@ void ConfigureService::OnBCATImplChanged() {
110 const auto boxcat = ui->bcat_source->currentText() == QStringLiteral("Boxcat"); 111 const auto boxcat = ui->bcat_source->currentText() == QStringLiteral("Boxcat");
111 ui->bcat_empty_header->setHidden(!boxcat); 112 ui->bcat_empty_header->setHidden(!boxcat);
112 ui->bcat_empty_label->setHidden(!boxcat); 113 ui->bcat_empty_label->setHidden(!boxcat);
113 ui->bcat_empty_header->setText(QStringLiteral("")); 114 ui->bcat_empty_header->setText(QString{});
114 ui->bcat_empty_label->setText(tr("Yuzu is retrieving the latest boxcat status...")); 115 ui->bcat_empty_label->setText(tr("Yuzu is retrieving the latest boxcat status..."));
115 116
116 if (!boxcat) 117 if (!boxcat)
diff --git a/src/yuzu/configuration/configure_service.h b/src/yuzu/configuration/configure_service.h
index efc8e21a8..f5c1b703a 100644
--- a/src/yuzu/configuration/configure_service.h
+++ b/src/yuzu/configuration/configure_service.h
@@ -30,5 +30,5 @@ private:
30 void OnUpdateBCATEmptyLabel(std::pair<QString, QString> string); 30 void OnUpdateBCATEmptyLabel(std::pair<QString, QString> string);
31 31
32 std::unique_ptr<Ui::ConfigureService> ui; 32 std::unique_ptr<Ui::ConfigureService> ui;
33 QFutureWatcher<std::pair<QString, QString>> watcher; 33 QFutureWatcher<std::pair<QString, QString>> watcher{this};
34}; 34};