From 282b22b784afbf04ff5f16e6945c0a20d190ffcd Mon Sep 17 00:00:00 2001 From: OpenSauce04 Date: Wed, 14 Aug 2024 13:16:24 +0100 Subject: [PATCH] Repurposed the Report Compatibility button The button now redirects to Lime3DS's compatibility-list repository This commit also removes the `CITRA_ENABLE_COMPATIBILITY_REPORTING` cmake option for obvious reasons --- .ci/linux.sh | 1 - .ci/macos.sh | 1 - .ci/windows.sh | 1 - src/lime_qt/CMakeLists.txt | 7 -- src/lime_qt/compatdb.cpp | 81 -------------- src/lime_qt/compatdb.h | 30 ------ src/lime_qt/compatdb.ui | 215 ------------------------------------- src/lime_qt/main.cpp | 21 +--- src/lime_qt/main.h | 3 +- src/lime_qt/main.ui | 6 -- 10 files changed, 5 insertions(+), 361 deletions(-) delete mode 100644 src/lime_qt/compatdb.cpp delete mode 100644 src/lime_qt/compatdb.h delete mode 100644 src/lime_qt/compatdb.ui diff --git a/.ci/linux.sh b/.ci/linux.sh index af07c1b05..10219eef3 100755 --- a/.ci/linux.sh +++ b/.ci/linux.sh @@ -19,7 +19,6 @@ cmake .. -G Ninja \ -DCMAKE_C_COMPILER=clang-18 \ "${EXTRA_CMAKE_FLAGS[@]}" \ -DENABLE_QT_TRANSLATION=ON \ - -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ -DUSE_DISCORD_PRESENCE=ON ninja diff --git a/.ci/macos.sh b/.ci/macos.sh index c4e2a284b..d666e64bb 100755 --- a/.ci/macos.sh +++ b/.ci/macos.sh @@ -7,7 +7,6 @@ cmake .. -GNinja \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DENABLE_QT_TRANSLATION=ON \ - -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ -DUSE_DISCORD_PRESENCE=ON ninja diff --git a/.ci/windows.sh b/.ci/windows.sh index db7ea6255..2762ed43e 100644 --- a/.ci/windows.sh +++ b/.ci/windows.sh @@ -6,7 +6,6 @@ cmake .. -G Ninja \ -DCMAKE_C_COMPILER_LAUNCHER=ccache \ -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ -DENABLE_QT_TRANSLATION=ON \ - -DCITRA_ENABLE_COMPATIBILITY_REPORTING=ON \ -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON \ -DUSE_DISCORD_PRESENCE=ON ninja diff --git a/src/lime_qt/CMakeLists.txt b/src/lime_qt/CMakeLists.txt index e508736c5..a2f14f40a 100644 --- a/src/lime_qt/CMakeLists.txt +++ b/src/lime_qt/CMakeLists.txt @@ -28,9 +28,6 @@ add_executable(lime-qt camera/qt_multimedia_camera.cpp camera/qt_multimedia_camera.h lime-qt.rc - compatdb.cpp - compatdb.h - compatdb.ui configuration/config.cpp configuration/config.h configuration/configure.ui @@ -334,10 +331,6 @@ target_compile_definitions(lime-qt PRIVATE -DQT_NO_CAST_TO_ASCII ) -if (CITRA_ENABLE_COMPATIBILITY_REPORTING) - target_compile_definitions(lime-qt PRIVATE -DCITRA_ENABLE_COMPATIBILITY_REPORTING) -endif() - if (USE_DISCORD_PRESENCE) target_sources(lime-qt PUBLIC discord_impl.cpp diff --git a/src/lime_qt/compatdb.cpp b/src/lime_qt/compatdb.cpp deleted file mode 100644 index 506706fe9..000000000 --- a/src/lime_qt/compatdb.cpp +++ /dev/null @@ -1,81 +0,0 @@ -// Copyright 2017 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#include -#include -#include -#include -#include "core/core.h" -#include "lime_qt/compatdb.h" -#include "ui_compatdb.h" - -CompatDB::CompatDB(QWidget* parent) - : QWizard(parent, Qt::WindowTitleHint | Qt::WindowCloseButtonHint | Qt::WindowSystemMenuHint), - ui{std::make_unique()} { - ui->setupUi(this); - connect(ui->radioButton_Perfect, &QRadioButton::clicked, this, &CompatDB::EnableNext); - connect(ui->radioButton_Great, &QRadioButton::clicked, this, &CompatDB::EnableNext); - connect(ui->radioButton_Okay, &QRadioButton::clicked, this, &CompatDB::EnableNext); - connect(ui->radioButton_Bad, &QRadioButton::clicked, this, &CompatDB::EnableNext); - connect(ui->radioButton_IntroMenu, &QRadioButton::clicked, this, &CompatDB::EnableNext); - connect(ui->radioButton_WontBoot, &QRadioButton::clicked, this, &CompatDB::EnableNext); - connect(button(NextButton), &QPushButton::clicked, this, &CompatDB::Submit); - connect(&testcase_watcher, &QFutureWatcher::finished, this, - &CompatDB::OnTestcaseSubmitted); -} - -CompatDB::~CompatDB() = default; - -enum class CompatDBPage { - Intro = 0, - Selection = 1, - Final = 2, -}; - -void CompatDB::Submit() { - QButtonGroup* compatibility = new QButtonGroup(this); - compatibility->addButton(ui->radioButton_Perfect, 0); - compatibility->addButton(ui->radioButton_Great, 1); - compatibility->addButton(ui->radioButton_Okay, 2); - compatibility->addButton(ui->radioButton_Bad, 3); - compatibility->addButton(ui->radioButton_IntroMenu, 4); - compatibility->addButton(ui->radioButton_WontBoot, 5); - switch ((static_cast(currentId()))) { - case CompatDBPage::Selection: - if (compatibility->checkedId() == -1) { - button(NextButton)->setEnabled(false); - } - break; - case CompatDBPage::Final: - back(); - LOG_DEBUG(Frontend, "Compatibility Rating: {}", compatibility->checkedId()); - - button(NextButton)->setEnabled(false); - button(NextButton)->setText(tr("Submitting")); - button(CancelButton)->setVisible(false); - - break; - default: - LOG_ERROR(Frontend, "Unexpected page: {}", currentId()); - } -} - -void CompatDB::OnTestcaseSubmitted() { - if (!testcase_watcher.result()) { - QMessageBox::critical(this, tr("Communication error"), - tr("An error occurred while sending the Testcase")); - button(NextButton)->setEnabled(true); - button(NextButton)->setText(tr("Next")); - button(CancelButton)->setVisible(true); - } else { - next(); - // older versions of QT don't support the "NoCancelButtonOnLastPage" option, this is a - // workaround - button(CancelButton)->setVisible(false); - } -} - -void CompatDB::EnableNext() { - button(NextButton)->setEnabled(true); -} diff --git a/src/lime_qt/compatdb.h b/src/lime_qt/compatdb.h deleted file mode 100644 index 5381f67f7..000000000 --- a/src/lime_qt/compatdb.h +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2017 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. - -#pragma once - -#include -#include -#include - -namespace Ui { -class CompatDB; -} - -class CompatDB : public QWizard { - Q_OBJECT - -public: - explicit CompatDB(QWidget* parent = nullptr); - ~CompatDB(); - -private: - QFutureWatcher testcase_watcher; - - std::unique_ptr ui; - - void Submit(); - void OnTestcaseSubmitted(); - void EnableNext(); -}; diff --git a/src/lime_qt/compatdb.ui b/src/lime_qt/compatdb.ui deleted file mode 100644 index 12e409352..000000000 --- a/src/lime_qt/compatdb.ui +++ /dev/null @@ -1,215 +0,0 @@ - - - CompatDB - - - - 0 - 0 - 600 - 482 - - - - - 500 - 410 - - - - Report Compatibility - - - QWizard::DisabledBackButtonOnLastPage|QWizard::HelpButtonOnRight|QWizard::NoBackButtonOnStartPage - - - - Report Game Compatibility - - - 0 - - - - - - <html><head/><body><p><span style=" font-size:10pt;">Should you choose to submit a test case to the </span><a href="https://citra-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">Lime3DS Compatibility List</span></a><span style=" font-size:10pt;">, The following information will be collected and displayed on the site:</span></p><ul style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;"><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Hardware Information (CPU / GPU / Operating System)</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Which version of Lime3DS you are running</li><li style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">The connected Citra account</li></ul></body></html> - - - true - - - true - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - Report Game Compatibility - - - 1 - - - - - - Perfect - - - - - - - <html><head/><body><p>Game functions flawlessly with no audio or graphical glitches.</p></body></html> - - - true - - - - - - - Great - - - - - - - <html><head/><body><p>Game functions with minor graphical or audio glitches and is playable from start to finish. May require some workarounds.</p></body></html> - - - true - - - - - - - Okay - - - - - - - <html><head/><body><p>Game functions with major graphical or audio glitches, but game is playable from start to finish with workarounds.</p></body></html> - - - true - - - - - - - Bad - - - - - - - <html><head/><body><p>Game functions, but with major graphical or audio glitches. Unable to progress in specific areas due to glitches even with workarounds.</p></body></html> - - - true - - - - - - - Intro/Menu - - - - - - - <html><head/><body><p>Game is completely unplayable due to major graphical or audio glitches. Unable to progress past the Start Screen.</p></body></html> - - - true - - - - - - - Won't Boot - - - true - - - false - - - - - - - <html><head/><body><p>The game crashes when attempting to startup.</p></body></html> - - - - - - - - 10 - - - - <html><head/><body><p>Independent of speed or performance, how well does this game play from start to finish on this version of Lime?</p></body></html> - - - true - - - - - - - Qt::Vertical - - - - 20 - 0 - - - - - - - - - Thank you for your submission! - - - 2 - - - - - - diff --git a/src/lime_qt/main.cpp b/src/lime_qt/main.cpp index e763b7652..3b964a534 100644 --- a/src/lime_qt/main.cpp +++ b/src/lime_qt/main.cpp @@ -46,7 +46,6 @@ #include "lime_qt/bootmanager.h" #include "lime_qt/camera/qt_multimedia_camera.h" #include "lime_qt/camera/still_image_camera.h" -#include "lime_qt/compatdb.h" #include "lime_qt/compatibility_list.h" #include "lime_qt/configuration/config.h" #include "lime_qt/configuration/configure_dialog.h" @@ -97,7 +96,6 @@ #include "core/savestate.h" #include "core/system_titles.h" #include "input_common/main.h" -#include "network/network_settings.h" #include "ui_main.h" #include "video_core/gpu.h" #include "video_core/renderer_base.h" @@ -339,9 +337,6 @@ GMainWindow::~GMainWindow() { } void GMainWindow::InitializeWidgets() { -#ifdef CITRA_ENABLE_COMPATIBILITY_REPORTING - ui->action_Report_Compatibility->setVisible(true); -#endif render_window = new GRenderWindow(this, emu_thread.get(), system, false); secondary_window = new GRenderWindow(this, emu_thread.get(), system, true); render_window->hide(); @@ -904,7 +899,10 @@ void GMainWindow::ConnectMenuEvents() { connect_menu(ui->action_Pause, &GMainWindow::OnPauseContinueGame); connect_menu(ui->action_Stop, &GMainWindow::OnStopGame); connect_menu(ui->action_Restart, [this] { BootGame(QString(game_path)); }); - connect_menu(ui->action_Report_Compatibility, &GMainWindow::OnMenuReportCompatibility); + connect_menu(ui->action_Report_Compatibility, []() { + QDesktopServices::openUrl(QUrl(QStringLiteral( + "https://github.com/Lime3DS/compatibility-list/blob/master/CONTRIBUTING.md"))); + }); connect_menu(ui->action_Configure, &GMainWindow::OnConfigure); connect_menu(ui->action_Configure_Current_Game, &GMainWindow::OnConfigurePerGame); @@ -2358,17 +2356,6 @@ void GMainWindow::OnLoadComplete() { UpdateSecondaryWindowVisibility(); } -void GMainWindow::OnMenuReportCompatibility() { - if (!NetSettings::values.citra_token.empty() && !NetSettings::values.citra_username.empty()) { - CompatDB compatdb{this}; - compatdb.exec(); - } else { - QMessageBox::critical(this, tr("Missing Citra Account"), - tr("You must link your Citra account to submit test cases." - "
Go to Emulation > Configure... > Web to do so.")); - } -} - void GMainWindow::ToggleFullscreen() { if (!emulation_running) { return; diff --git a/src/lime_qt/main.h b/src/lime_qt/main.h index 774668bfa..249058901 100644 --- a/src/lime_qt/main.h +++ b/src/lime_qt/main.h @@ -1,4 +1,4 @@ -// Copyright 2014 Citra Emulator Project +// Copyright Citra Emulator Project / Lime3DS Emulator Project // Licensed under GPLv2 or any later version // Refer to the license.txt file included. @@ -230,7 +230,6 @@ private slots: void OnStopGame(); void OnSaveState(); void OnLoadState(); - void OnMenuReportCompatibility(); /// Called whenever a user selects a game in the game list widget. void OnGameListLoadFile(QString game_path); void OnGameListOpenFolder(u64 program_id, GameListOpenTarget target); diff --git a/src/lime_qt/main.ui b/src/lime_qt/main.ui index d54b17378..cfa6b2e69 100644 --- a/src/lime_qt/main.ui +++ b/src/lime_qt/main.ui @@ -560,15 +560,9 @@ - - false - Report Compatibility - - false -