From 2b304bb3c5fa60af7e37f698a4eddbb9101c68d2 Mon Sep 17 00:00:00 2001 From: Kawaii Date: Wed, 6 Mar 2024 22:48:59 -0600 Subject: [PATCH 1/5] Replace more frontend text --- src/yuzu/aboutdialog.ui | 34 +++++-------------- src/yuzu/main.cpp | 74 ++++++++++++++++++++--------------------- src/yuzu/main.ui | 8 ++--- 3 files changed, 49 insertions(+), 67 deletions(-) diff --git a/src/yuzu/aboutdialog.ui b/src/yuzu/aboutdialog.ui index 107fa8e95d..3b0c47e6d1 100644 --- a/src/yuzu/aboutdialog.ui +++ b/src/yuzu/aboutdialog.ui @@ -1,4 +1,5 @@ + AboutDialog @@ -11,7 +12,7 @@ - About yuzu + About suyu @@ -69,7 +70,7 @@ - <html><head/><body><p><span style=" font-size:28pt;">Suyu</span></p></body></html> + <html><head/><body><p><span style=" font-size:28pt;">suyu</span></p></body></html> @@ -99,9 +100,9 @@ <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;"> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">Suyu is an experimental open-source emulator for the Nintendo Switch licensed under GPLv3.0+.</span></p> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">suyu is a continuation of an experimental open-source emulator for the Nintendo Switch licensed under GPLv3.0+.</span></p> <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'MS Shell Dlg 2'; font-size:8pt;"><br /></p> -<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">This software should not be used to play games you have not legally obtained.</span></p></body></html> +<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'MS Shell Dlg 2'; font-size:12pt;">This software should not be used to play games you have not legally obtained. No support will be provided if you have not legally obtained your game dumps.</span></p></body></html> Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter @@ -127,7 +128,7 @@ p, li { white-space: pre-wrap; } - <html><head/><body><p><a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://discord.com/invite/2gQRBp44KT"><span style=" text-decoration: underline; color:#039be5;">Discord</span></a> | <a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/graphs/master"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/blob/master/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> + <html><head/><body><p><a href="https://suyu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/project_members"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/blob/dev/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> true @@ -143,7 +144,7 @@ p, li { white-space: pre-wrap; } - <html><head/><body><p><span style=" font-size:7pt;">&quot;Nintendo Switch&quot; is a trademark of Nintendo. Suyu is not affiliated with Nintendo in any way.</span></p></body></html> + <html><head/><body><p><span style=" font-size:7pt;">&quot;Nintendo Switch&quot; is a trademark of Nintendo. suyu is not affiliated with Nintendo in any way.</span></p></body></html> @@ -164,6 +165,7 @@ p, li { white-space: pre-wrap; } + @@ -172,32 +174,12 @@ p, li { white-space: pre-wrap; } accepted() AboutDialog accept() - - - 20 - 20 - - - 20 - 20 - - buttonBox rejected() AboutDialog reject() - - - 20 - 20 - - - 20 - 20 - - diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index ff6cc95f02..af690adb90 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2014 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by JuanCStar on 2024/03/06 +// Modified by KawaiiBunga on <2024/03/06> #include #include @@ -213,8 +213,8 @@ void GMainWindow::ShowTelemetryCallout() { UISettings::values.callout_flags = UISettings::values.callout_flags.GetValue() | static_cast(CalloutFlag::Telemetry); const QString telemetry_message = - tr("Anonymous " - "data is collected to help improve yuzu. " + tr("Anonymous " + "data is collected to help improve suyu. " "

Would you like to share your usage data with us?"); if (!question(this, tr("Telemetry"), telemetry_message)) { Settings::values.enable_telemetry = false; @@ -372,13 +372,13 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulk const auto description = std::string(Common::g_scm_desc); const auto build_id = std::string(Common::g_build_id); - const auto yuzu_build = fmt::format("Suyu Development Build | {}-{}", branch_name, description); + const auto suyu_build = fmt::format("suyu Development Build | {}-{}", branch_name, description); const auto override_build = fmt::format(fmt::runtime(std::string(Common::g_title_bar_format_idle)), build_id); - const auto yuzu_build_version = override_build.empty() ? yuzu_build : override_build; + const auto suyu_build_version = override_build.empty() ? suyu_build : override_build; const auto processor_count = std::thread::hardware_concurrency(); - LOG_INFO(Frontend, "Suyu Version: {}", yuzu_build_version); + LOG_INFO(Frontend, "suyu Version: {}", suyu_build_version); LogRuntimes(); #ifdef ARCHITECTURE_x86_64 const auto& caps = Common::GetCPUCaps(); @@ -448,7 +448,7 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulk QMessageBox::warning(this, tr("Broken Vulkan Installation Detected"), tr("Vulkan initialization failed during boot.

Click " "here for instructions to fix the issue.")); @@ -470,7 +470,7 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulk // Set a screensaver inhibition reason string. Currently passed to DBus by SDL and visible to // the user through their desktop environment. - //: TRANSLATORS: This string is shown to the user to explain why yuzu needs to prevent the + //: TRANSLATORS: This string is shown to the user to explain why suyu needs to prevent the //: computer from sleeping QByteArray wakelock_reason = tr("Running a game").toUtf8(); SDL_SetHint(SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME, wakelock_reason.data()); @@ -1338,7 +1338,7 @@ void GMainWindow::InitializeHotkeys() { LinkActionShortcut(ui->action_Load_File, QStringLiteral("Load File")); LinkActionShortcut(ui->action_Load_Amiibo, QStringLiteral("Load/Remove Amiibo")); - LinkActionShortcut(ui->action_Exit, QStringLiteral("Exit yuzu")); + LinkActionShortcut(ui->action_Exit, QStringLiteral("Exit suyu")); LinkActionShortcut(ui->action_Restart, QStringLiteral("Restart Emulation")); LinkActionShortcut(ui->action_Pause, QStringLiteral("Continue/Pause Emulation")); LinkActionShortcut(ui->action_Stop, QStringLiteral("Stop Emulation")); @@ -1817,8 +1817,8 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa tr("You are using the deconstructed ROM directory format for this game, which is an " "outdated format that has been superseded by others such as NCA, NAX, XCI, or " "NSP. Deconstructed ROM directories lack icons, metadata, and update " - "support.

For an explanation of the various Switch formats yuzu supports, check out our " + "support.

For an explanation of the various Switch formats suyu supports,
check out our " "wiki. This message will not be shown again.")); } @@ -1832,11 +1832,11 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa case Core::SystemResultStatus::ErrorVideoCore: QMessageBox::critical( this, tr("An error occurred initializing the video core."), - tr("yuzu has encountered an error while running the video core. " + tr("suyu has encountered an error while running the video core. " "This is usually caused by outdated GPU drivers, including integrated ones. " "Please see the log for more details. " "For more information on accessing the log, please see the following page: " - "" + "" "How to Upload the Log File. ")); break; default: @@ -1850,9 +1850,9 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa tr("Error while loading ROM! %1", "%1 signifies a numeric error code.") .arg(QString::fromStdString(error_code)); const auto description = - tr("%1
Please follow the " - "yuzu quickstart guide to redump your files.
You can refer " - "to the yuzu wiki or the yuzu Discord for help.", + tr("%1
Please follow the " + "suyu quickstart guide to redump your files.
You can refer " + "to the suyu wiki or the suyu Discord for help.", "%1 signifies an error string.") .arg(QString::fromStdString( GetResultStatusString(static_cast(error_id)))); @@ -1927,7 +1927,7 @@ void GMainWindow::ConfigureFilesystemProvider(const std::string& filepath) { void GMainWindow::BootGame(const QString& filename, Service::AM::FrontendAppletParameters params, StartGameType type) { - LOG_INFO(Frontend, "yuzu starting..."); + LOG_INFO(Frontend, "suyu starting..."); if (params.program_id == 0 || params.program_id > static_cast(Service::AM::AppletProgramId::MaxProgramId)) { @@ -2844,7 +2844,7 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, directory = it->second.second; } - QDesktopServices::openUrl(QUrl(QStringLiteral("https://yuzu-emu.org/game/") + directory)); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://suyu-emu.org/game/") + directory)); } bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, @@ -2982,7 +2982,7 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, std::filesystem::path& out_icon_path) { - // Get path to Yuzu icons directory & icon extension + // Get path to Suyu icons directory & icon extension std::string ico_extension = "png"; #if defined(_WIN32) out_icon_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::IconsDir); @@ -3009,7 +3009,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& game_path, GameListShortcutTarget target) { - // Get path to yuzu executable + // Get path to suyu executable const QStringList args = QApplication::arguments(); std::filesystem::path yuzu_command = args[0].toStdString(); // If relative path, make it an absolute path @@ -3090,7 +3090,7 @@ void GMainWindow::OnGameListCreateShortcut(u64 program_id, const std::string& ga this, GMainWindow::CREATE_SHORTCUT_MSGBOX_FULLSCREEN_YES, qt_game_title)) { arguments = "-f " + arguments; } - const std::string comment = fmt::format("Start {:s} with the yuzu Emulator", game_title); + const std::string comment = fmt::format("Start {:s} with the suyu Emulator", game_title); const std::string categories = "Game;Emulator;Qt;"; const std::string keywords = "Switch;Nintendo;"; @@ -3560,9 +3560,9 @@ void GMainWindow::OnMenuReportCompatibility() { compatdb.exec(); } else { QMessageBox::critical( - this, tr("Missing yuzu Account"), - tr("In order to submit a game compatibility test case, you must link your yuzu " - "account.

To link your yuzu account, go to Emulation > Configuration " + this, tr("Missing suyu Account"), + tr("In order to submit a game compatibility test case, you must link your suyu " + "account.

To link your suyu account, go to Emulation > Configuration " "> " "Web.")); } @@ -3582,15 +3582,15 @@ void GMainWindow::OpenURL(const QUrl& url) { } void GMainWindow::OnOpenModsPage() { - OpenURL(QUrl(QStringLiteral("https://github.com/yuzu-emu/yuzu/wiki/Switch-Mods"))); + OpenURL(QUrl(QStringLiteral("https://gitlabs.com/suyu-emu/suyu/wiki/Switch-Mods"))); } void GMainWindow::OnOpenQuickstartGuide() { - OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/help/quickstart/"))); + OpenURL(QUrl(QStringLiteral("https://suyu-emu.org/help/quickstart/"))); } void GMainWindow::OnOpenFAQ() { - OpenURL(QUrl(QStringLiteral("https://yuzu-emu.org/wiki/faq/"))); + OpenURL(QUrl(QStringLiteral("https://suyu-emu.org/wiki/faq/"))); } void GMainWindow::ToggleFullscreen() { @@ -4166,7 +4166,7 @@ void GMainWindow::OnInstallFirmware() { if (!ContentManager::AreKeysPresent()) { QMessageBox::information( this, tr("Keys not installed"), - tr("Install decryption keys and restart yuzu before attempting to install firmware.")); + tr("Install decryption keys and restart suyu before attempting to install firmware.")); return; } @@ -4256,7 +4256,7 @@ void GMainWindow::OnInstallFirmware() { QMessageBox::warning( this, tr("Firmware install failed"), tr("Firmware installation cancelled, firmware may be in bad state, " - "restart yuzu or re-install firmware.")); + "restart suyu or re-install firmware.")); return; } } @@ -4792,7 +4792,7 @@ void GMainWindow::OnCheckFirmwareDecryption() { QMessageBox::warning( this, tr("Derivation Components Missing"), tr("Encryption keys are missing. " - "
Please follow the yuzu " + "
Please follow
the suyu " "quickstart guide to get all your keys, firmware and " "games.")); } @@ -4907,8 +4907,8 @@ bool GMainWindow::ConfirmClose() { UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Based_On_Game) { return true; } - const auto text = tr("Are you sure you want to close yuzu?"); - return question(this, tr("yuzu"), text); + const auto text = tr("Are you sure you want to close suyu?"); + return question(this, tr("suyu"), text); } void GMainWindow::closeEvent(QCloseEvent* event) { @@ -4988,7 +4988,7 @@ bool GMainWindow::ConfirmChangeGame() { // Use custom question to link controller navigation return question( - this, tr("yuzu"), + this, tr("suyu"), tr("Are you sure you want to stop the emulation? Any unsaved progress will be lost."), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes); } @@ -4997,10 +4997,10 @@ bool GMainWindow::ConfirmForceLockedExit() { if (emu_thread == nullptr) { return true; } - const auto text = tr("The currently running application has requested yuzu to not exit.\n\n" + const auto text = tr("The currently running application has requested suyu to not exit.\n\n" "Would you like to bypass this and exit anyway?"); - return question(this, tr("yuzu"), text); + return question(this, tr("suyu"), text); } void GMainWindow::RequestGameExit() { @@ -5277,8 +5277,8 @@ int main(int argc, char* argv[]) { Common::ConfigureNvidiaEnvironmentFlags(); // Init settings params - QCoreApplication::setOrganizationName(QStringLiteral("yuzu team")); - QCoreApplication::setApplicationName(QStringLiteral("yuzu")); + QCoreApplication::setOrganizationName(QStringLiteral("suyu team")); + QCoreApplication::setApplicationName(QStringLiteral("suyu")); #ifdef _WIN32 // Increases the maximum open file limit to 8192 diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index bcc892672f..91fefecc32 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -45,7 +45,7 @@ 0 0 1280 - 22 + 21 @@ -128,8 +128,8 @@ - - + + true @@ -376,7 +376,7 @@ - Open &yuzu Folder + Open &suyu Folder From 0d40138fc47b7b3c7f94caddd82d8ed1531e8c1a Mon Sep 17 00:00:00 2001 From: KawaiiBunga <20389496-KawaiiBunga@users.noreply.gitlab.com> Date: Thu, 7 Mar 2024 07:40:29 +0000 Subject: [PATCH 2/5] gitlabs -> gitlab --- src/yuzu/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index af690adb90..e4b59bb59e 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3582,7 +3582,7 @@ void GMainWindow::OpenURL(const QUrl& url) { } void GMainWindow::OnOpenModsPage() { - OpenURL(QUrl(QStringLiteral("https://gitlabs.com/suyu-emu/suyu/wiki/Switch-Mods"))); + OpenURL(QUrl(QStringLiteral("https://gitlab.com/suyu-emu/suyu/wiki/Switch-Mods"))); } void GMainWindow::OnOpenQuickstartGuide() { From 5a09e29c1c99c3d869d2aeabdc426a458faad80d Mon Sep 17 00:00:00 2001 From: Kawaii Date: Thu, 7 Mar 2024 02:50:38 -0600 Subject: [PATCH 3/5] Update links --- src/yuzu/aboutdialog.ui | 4 ++-- src/yuzu/main.cpp | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/yuzu/aboutdialog.ui b/src/yuzu/aboutdialog.ui index 3b0c47e6d1..bd4082c1d1 100644 --- a/src/yuzu/aboutdialog.ui +++ b/src/yuzu/aboutdialog.ui @@ -1,5 +1,5 @@ - + AboutDialog @@ -128,7 +128,7 @@ p, li { white-space: pre-wrap; } - <html><head/><body><p><a href="https://suyu-emu.org/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/project_members"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/blob/dev/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> + <html><head/><body><p><a href="https://suyu.dev/"><span style=" text-decoration: underline; color:#039be5;">Website</span></a> | <a href="https://gitlab.com/suyu-emu/suyu"><span style=" text-decoration: underline; color:#039be5;">Source Code</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/project_members"><span style=" text-decoration: underline; color:#039be5;">Contributors</span></a> | <a href="https://gitlab.com/suyu-emu/suyu/-/blob/dev/LICENSE.txt"><span style=" text-decoration: underline; color:#039be5;">License</span></a></p></body></html> true diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e4b59bb59e..7b22de62ac 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1,7 +1,7 @@ // SPDX-FileCopyrightText: 2014 Citra Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by KawaiiBunga on <2024/03/06> +// Modified by KawaiiBunga on <2024/03/07> #include #include @@ -213,7 +213,7 @@ void GMainWindow::ShowTelemetryCallout() { UISettings::values.callout_flags = UISettings::values.callout_flags.GetValue() | static_cast(CalloutFlag::Telemetry); const QString telemetry_message = - tr("Anonymous " + tr("Anonymous " "data is collected to help improve suyu. " "

Would you like to share your usage data with us?"); if (!question(this, tr("Telemetry"), telemetry_message)) { @@ -448,7 +448,7 @@ GMainWindow::GMainWindow(std::unique_ptr config_, bool has_broken_vulk QMessageBox::warning(this, tr("Broken Vulkan Installation Detected"), tr("Vulkan initialization failed during boot.

Click " "here for instructions to fix the issue.")); @@ -1818,7 +1818,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa "outdated format that has been superseded by others such as NCA, NAX, XCI, or " "NSP. Deconstructed ROM directories lack icons, metadata, and update " "support.

For an explanation of the various Switch formats suyu supports, check out our " + "href='https://gitlab.com/suyu-emu/suyu/-/wikis/wiki/Overview-of-Switch-Game-Formats'>check out our " "wiki. This message will not be shown again.")); } @@ -1836,7 +1836,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa "This is usually caused by outdated GPU drivers, including integrated ones. " "Please see the log for more details. " "For more information on accessing the log, please see the following page: " - "" + "" "How to Upload the Log File. ")); break; default: @@ -1850,7 +1850,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa tr("Error while loading ROM! %1", "%1 signifies a numeric error code.") .arg(QString::fromStdString(error_code)); const auto description = - tr("%1
Please follow the " + tr("%1
Please follow
the " "suyu quickstart guide to redump your files.
You can refer " "to the suyu wiki or the suyu Discord for help.", "%1 signifies an error string.") @@ -2844,7 +2844,7 @@ void GMainWindow::OnGameListNavigateToGamedbEntry(u64 program_id, directory = it->second.second; } - QDesktopServices::openUrl(QUrl(QStringLiteral("https://suyu-emu.org/game/") + directory)); + QDesktopServices::openUrl(QUrl(QStringLiteral("https://suyu.dev/game/") + directory)); } bool GMainWindow::CreateShortcutLink(const std::filesystem::path& shortcut_path, @@ -3586,11 +3586,11 @@ void GMainWindow::OnOpenModsPage() { } void GMainWindow::OnOpenQuickstartGuide() { - OpenURL(QUrl(QStringLiteral("https://suyu-emu.org/help/quickstart/"))); + OpenURL(QUrl(QStringLiteral("https://gitlab.com/suyu-emu/suyu/-/wikis/wiki/Quickstart"))); } void GMainWindow::OnOpenFAQ() { - OpenURL(QUrl(QStringLiteral("https://suyu-emu.org/wiki/faq/"))); + OpenURL(QUrl(QStringLiteral("https://gitlab.com/suyu-emu/suyu/-/wikis/wiki/FAQ"))); } void GMainWindow::ToggleFullscreen() { @@ -4792,7 +4792,7 @@ void GMainWindow::OnCheckFirmwareDecryption() { QMessageBox::warning( this, tr("Derivation Components Missing"), tr("Encryption keys are missing. " - "
Please follow the suyu " + "
Please follow
the suyu " "quickstart guide to get all your keys, firmware and " "games.")); } From b034086f38c858e78d07bee6e6658249a872db91 Mon Sep 17 00:00:00 2001 From: Kawaii Date: Thu, 7 Mar 2024 12:30:15 -0600 Subject: [PATCH 4/5] Update to latest branch --- src/android/app/src/main/jni/native.cpp | 6 +- src/android/app/src/main/jni/native_input.cpp | 6 +- src/common/CMakeLists.txt | 6 +- src/common/common_funcs.h | 6 +- src/common/fs/fs_paths.h | 10 +- src/common/fs/path_util.cpp | 108 ++++---- src/common/fs/path_util.h | 44 ++-- src/common/intrusive_list.h | 8 +- src/common/intrusive_red_black_tree.h | 8 +- src/common/logging/backend.cpp | 4 +- src/common/nvidia_flags.cpp | 4 +- src/common/scope_exit.h | 4 +- src/common/settings.cpp | 12 +- src/common/settings.h | 4 +- src/common/telemetry.h | 8 +- src/core/arm/arm_interface.h | 6 +- src/core/crypto/key_manager.cpp | 14 +- src/core/file_sys/bis_factory.cpp | 4 +- src/core/file_sys/fs_path.h | 8 +- ...ssystem_aes_ctr_counter_extended_storage.h | 6 +- .../fssystem/fssystem_aes_ctr_storage.h | 6 +- .../fssystem/fssystem_aes_xts_storage.h | 6 +- .../fssystem_alignment_matching_storage.h | 10 +- .../file_sys/fssystem/fssystem_bucket_tree.h | 12 +- .../fssystem/fssystem_compressed_storage.h | 14 +- ...rarchical_integrity_verification_storage.h | 6 +- .../fssystem_hierarchical_sha256_storage.h | 6 +- .../fssystem/fssystem_indirect_storage.h | 6 +- .../fssystem_integrity_verification_storage.h | 6 +- ...stem_memory_resource_buffer_hold_storage.h | 6 +- .../fssystem_nca_file_system_driver.cpp | 6 +- .../fssystem_nca_file_system_driver.h | 14 +- .../fssystem/fssystem_pooled_buffer.h | 4 +- .../fssystem/fssystem_sparse_storage.h | 6 +- .../fssystem/fssystem_switch_storage.h | 6 +- src/core/file_sys/vfs/vfs.h | 14 +- src/core/hle/kernel/k_auto_object.h | 8 +- src/core/hle/kernel/k_auto_object_container.h | 6 +- .../hle/kernel/k_dynamic_resource_manager.h | 6 +- src/core/hle/kernel/k_dynamic_slab_heap.h | 6 +- src/core/hle/kernel/k_handle_table.h | 6 +- src/core/hle/kernel/k_memory_region.h | 14 +- src/core/hle/kernel/k_page_table_base.cpp | 6 +- src/core/hle/kernel/k_page_table_base.h | 6 +- src/core/hle/kernel/k_scheduler.h | 6 +- src/core/hle/kernel/k_slab_heap.h | 10 +- src/core/hle/kernel/k_spin_lock.h | 6 +- src/core/hle/kernel/physical_core.h | 6 +- src/core/hle/result.h | 6 +- src/core/hle/service/acc/acc.cpp | 4 +- src/core/hle/service/acc/profile_manager.cpp | 8 +- .../am/frontend/applet_web_browser.cpp | 6 +- src/core/hle/service/caps/caps_manager.cpp | 6 +- .../hle/service/filesystem/filesystem.cpp | 16 +- src/core/hle/service/jit/jit_code_memory.h | 4 +- .../hle/service/mii/mii_database_manager.cpp | 6 +- .../hle/service/nfc/common/amiibo_crypto.cpp | 6 +- src/core/hle/service/nfc/common/device.cpp | 8 +- .../service/set/system_settings_server.cpp | 18 +- .../ssl/ssl_backend_securetransport.cpp | 4 +- src/core/internal_network/network.cpp | 10 +- src/core/internal_network/network.h | 6 +- src/core/internal_network/socket_proxy.cpp | 4 +- src/core/internal_network/sockets.h | 10 +- src/core/loader/loader.h | 6 +- src/core/perf_stats.cpp | 4 +- src/core/reporter.cpp | 8 +- src/core/telemetry_session.cpp | 6 +- src/dedicated_room/yuzu_room.rc | 2 - src/frontend_common/config.cpp | 40 +-- src/hid_core/frontend/emulated_console.h | 6 +- src/hid_core/frontend/emulated_controller.h | 6 +- src/hid_core/frontend/emulated_devices.h | 6 +- src/hid_core/hid_core.h | 6 +- src/input_common/drivers/tas_input.cpp | 6 +- src/video_core/host1x/ffmpeg/ffmpeg.h | 30 +-- src/video_core/macro/macro.cpp | 4 +- src/video_core/renderer_base.h | 6 +- src/video_core/renderer_opengl/gl_device.cpp | 6 +- .../renderer_opengl/gl_resource_manager.h | 28 +-- .../renderer_opengl/gl_shader_cache.cpp | 4 +- .../renderer_vulkan/vk_pipeline_cache.cpp | 4 +- src/video_core/shader_environment.cpp | 4 +- .../nsight_aftermath_tracker.cpp | 4 +- src/yuzu/CMakeLists.txt | 8 +- src/yuzu/Info.plist | 2 +- src/yuzu/about_dialog.cpp | 2 - src/yuzu/about_dialog.h | 2 - src/yuzu/aboutdialog.ui | 2 +- src/yuzu/applets/qt_profile_select.cpp | 4 +- src/yuzu/applets/qt_web_browser.cpp | 6 +- src/yuzu/bootmanager.cpp | 16 +- src/yuzu/bootmanager.h | 4 +- src/yuzu/breakpad.cpp | 8 +- src/yuzu/compatdb.ui | 2 +- src/yuzu/configuration/configure_camera.cpp | 8 +- src/yuzu/configuration/configure_camera.h | 4 +- src/yuzu/configuration/configure_debug.cpp | 4 +- .../configuration/configure_filesystem.cpp | 22 +- .../configure_input_advanced.cpp | 4 +- .../configure_per_game_addons.cpp | 4 +- .../configure_profile_manager.cpp | 6 +- src/yuzu/configuration/configure_tas.cpp | 6 +- src/yuzu/configuration/configure_ui.cpp | 10 +- src/yuzu/configuration/input_profiles.cpp | 6 +- src/yuzu/game_list.cpp | 14 +- src/yuzu/game_list.h | 11 +- src/yuzu/game_list_worker.cpp | 6 +- src/yuzu/loading_screen.cpp | 8 +- src/yuzu/loading_screen.h | 6 +- src/yuzu/main.cpp | 232 ++---------------- src/yuzu/main.h | 6 +- src/yuzu/main.ui | 7 +- src/yuzu/play_time_manager.cpp | 4 +- src/yuzu/play_time_manager.h | 6 +- src/yuzu/startup_checks.cpp | 10 +- src/yuzu/startup_checks.h | 10 +- src/yuzu/suyu.qrc | 2 - src/yuzu/suyu.rc | 2 - src/yuzu/uisettings.cpp | 8 +- src/yuzu/uisettings.h | 4 +- src/yuzu/vk_device_info.cpp | 2 +- src/yuzu/vk_device_info.h | 2 +- src/yuzu_cmd/CMakeLists.txt | 2 - src/yuzu_cmd/suyu.rc | 2 - 125 files changed, 535 insertions(+), 737 deletions(-) diff --git a/src/android/app/src/main/jni/native.cpp b/src/android/app/src/main/jni/native.cpp index 5d484a85e2..397436cf0e 100644 --- a/src/android/app/src/main/jni/native.cpp +++ b/src/android/app/src/main/jni/native.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -659,7 +659,7 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_submitInlineKeyboardInput(JNIEnv* env void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmptyUserDirectory(JNIEnv* env, jobject instance) { - const auto nand_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir); + const auto nand_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir); auto vfs_nand_dir = EmulationSession::GetInstance().System().GetFilesystem()->OpenDirectory( Common::FS::PathToUTF8String(nand_dir), FileSys::OpenMode::Read); @@ -831,7 +831,7 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getSavePath(JNIEnv* env, jobject j const auto user_id = manager.GetUser(static_cast(0)); ASSERT(user_id); - const auto nandDir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir); + const auto nandDir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir); auto vfsNandDir = system.GetFilesystem()->OpenDirectory(Common::FS::PathToUTF8String(nandDir), FileSys::OpenMode::Read); diff --git a/src/android/app/src/main/jni/native_input.cpp b/src/android/app/src/main/jni/native_input.cpp index 4935a46070..c261f19d6f 100644 --- a/src/android/app/src/main/jni/native_input.cpp +++ b/src/android/app/src/main/jni/native_input.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: 2024 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -44,7 +44,7 @@ bool IsProfileNameValid(std::string_view profile_name) { } bool ProfileExistsInFilesystem(std::string_view profile_name) { - return Common::FS::Exists(Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "input" / + return Common::FS::Exists(Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir) / "input" / fmt::format("{}.ini", profile_name)); } @@ -304,7 +304,7 @@ void Java_org_yuzu_yuzu_1emu_features_input_NativeInput_loadInputProfiles(JNIEnv jobject j_obj) { map_profiles.clear(); const auto input_profile_loc = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "input"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir) / "input"; if (Common::FS::IsDir(input_profile_loc)) { Common::FS::IterateDirEntries( diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 779be211e6..4f502a42ec 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2018 yuzu Emulator Project +# SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 suyu Emulator Project # SPDX-License-Identifier: GPL-2.0-or-later if (DEFINED ENV{AZURECIREPO}) @@ -161,8 +161,8 @@ add_library(common STATIC zstd_compression.h ) -if (YUZU_ENABLE_PORTABLE) - add_compile_definitions(YUZU_ENABLE_PORTABLE) +if (SUYU_ENABLE_PORTABLE) + add_compile_definitions(SUYU_ENABLE_PORTABLE) endif() if (WIN32) diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index ba3081efb4..4eb8a12382 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -109,11 +109,11 @@ __declspec(dllimport) void __stdcall DebugBreak(void); return static_cast(key) == 0; \ } -#define YUZU_NON_COPYABLE(cls) \ +#define SUYU_NON_COPYABLE(cls) \ cls(const cls&) = delete; \ cls& operator=(const cls&) = delete -#define YUZU_NON_MOVEABLE(cls) \ +#define SUYU_NON_MOVEABLE(cls) \ cls(cls&&) = delete; \ cls& operator=(cls&&) = delete diff --git a/src/common/fs/fs_paths.h b/src/common/fs/fs_paths.h index 171a659443..6d30d16435 100644 --- a/src/common/fs/fs_paths.h +++ b/src/common/fs/fs_paths.h @@ -1,14 +1,14 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -// yuzu data directories +// suyu data directories -#define YUZU_DIR "suyu" +#define SUYU_DIR "suyu" #define PORTABLE_DIR "user" -// Sub-directories contained within a yuzu data directory +// Sub-directories contained within a suyu data directory #define AMIIBO_DIR "amiibo" #define CACHE_DIR "cache" @@ -26,6 +26,6 @@ #define TAS_DIR "tas" #define ICONS_DIR "icons" -// yuzu-specific files +// suyu-specific files #define LOG_FILE "suyu_log.txt" diff --git a/src/common/fs/path_util.cpp b/src/common/fs/path_util.cpp index 4f69db6f5c..f92cbe0f7b 100644 --- a/src/common/fs/path_util.cpp +++ b/src/common/fs/path_util.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -56,10 +56,10 @@ namespace fs = std::filesystem; /** * The PathManagerImpl is a singleton allowing to manage the mapping of - * YuzuPath enums to real filesystem paths. - * This class provides 2 functions: GetYuzuPathImpl and SetYuzuPathImpl. - * These are used by GetYuzuPath and SetYuzuPath respectively to get or modify - * the path mapped by the YuzuPath enum. + * SuyuPath enums to real filesystem paths. + * This class provides 2 functions: GetSuyuPathImpl and SetSuyuPathImpl. + * These are used by GetSuyuPath and SetSuyuPath respectively to get or modify + * the path mapped by the SuyuPath enum. */ class PathManagerImpl { public: @@ -75,62 +75,62 @@ public: PathManagerImpl(PathManagerImpl&&) = delete; PathManagerImpl& operator=(PathManagerImpl&&) = delete; - [[nodiscard]] const fs::path& GetYuzuPathImpl(YuzuPath yuzu_path) { - return yuzu_paths.at(yuzu_path); + [[nodiscard]] const fs::path& GetSuyuPathImpl(SuyuPath suyu_path) { + return suyu_paths.at(suyu_path); } - void SetYuzuPathImpl(YuzuPath yuzu_path, const fs::path& new_path) { - yuzu_paths.insert_or_assign(yuzu_path, new_path); + void SetSuyuPathImpl(SuyuPath suyu_path, const fs::path& new_path) { + suyu_paths.insert_or_assign(suyu_path, new_path); } - void Reinitialize(fs::path yuzu_path = {}) { - fs::path yuzu_path_cache; - fs::path yuzu_path_config; + void Reinitialize(fs::path suyu_path = {}) { + fs::path suyu_path_cache; + fs::path suyu_path_config; #ifdef _WIN32 -#ifdef YUZU_ENABLE_PORTABLE - yuzu_path = GetExeDirectory() / PORTABLE_DIR; +#ifdef SUYU_ENABLE_PORTABLE + suyu_path = GetExeDirectory() / PORTABLE_DIR; #endif - if (!IsDir(yuzu_path)) { - yuzu_path = GetAppDataRoamingDirectory() / YUZU_DIR; + if (!IsDir(suyu_path)) { + suyu_path = GetAppDataRoamingDirectory() / SUYU_DIR; } - yuzu_path_cache = yuzu_path / CACHE_DIR; - yuzu_path_config = yuzu_path / CONFIG_DIR; + suyu_path_cache = suyu_path / CACHE_DIR; + suyu_path_config = suyu_path / CONFIG_DIR; #elif ANDROID - ASSERT(!yuzu_path.empty()); - yuzu_path_cache = yuzu_path / CACHE_DIR; - yuzu_path_config = yuzu_path / CONFIG_DIR; + ASSERT(!suyu_path.empty()); + suyu_path_cache = suyu_path / CACHE_DIR; + suyu_path_config = suyu_path / CONFIG_DIR; #else -#ifdef YUZU_ENABLE_PORTABLE - yuzu_path = GetCurrentDir() / PORTABLE_DIR; +#ifdef SUYU_ENABLE_PORTABLE + suyu_path = GetCurrentDir() / PORTABLE_DIR; #endif - if (Exists(yuzu_path) && IsDir(yuzu_path)) { - yuzu_path_cache = yuzu_path / CACHE_DIR; - yuzu_path_config = yuzu_path / CONFIG_DIR; + if (Exists(suyu_path) && IsDir(suyu_path)) { + suyu_path_cache = suyu_path / CACHE_DIR; + suyu_path_config = suyu_path / CONFIG_DIR; } else { - yuzu_path = GetDataDirectory("XDG_DATA_HOME") / YUZU_DIR; - yuzu_path_cache = GetDataDirectory("XDG_CACHE_HOME") / YUZU_DIR; - yuzu_path_config = GetDataDirectory("XDG_CONFIG_HOME") / YUZU_DIR; + suyu_path = GetDataDirectory("XDG_DATA_HOME") / SUYU_DIR; + suyu_path_cache = GetDataDirectory("XDG_CACHE_HOME") / SUYU_DIR; + suyu_path_config = GetDataDirectory("XDG_CONFIG_HOME") / SUYU_DIR; } #endif - GenerateYuzuPath(YuzuPath::YuzuDir, yuzu_path); - GenerateYuzuPath(YuzuPath::AmiiboDir, yuzu_path / AMIIBO_DIR); - GenerateYuzuPath(YuzuPath::CacheDir, yuzu_path_cache); - GenerateYuzuPath(YuzuPath::ConfigDir, yuzu_path_config); - GenerateYuzuPath(YuzuPath::CrashDumpsDir, yuzu_path / CRASH_DUMPS_DIR); - GenerateYuzuPath(YuzuPath::DumpDir, yuzu_path / DUMP_DIR); - GenerateYuzuPath(YuzuPath::KeysDir, yuzu_path / KEYS_DIR); - GenerateYuzuPath(YuzuPath::LoadDir, yuzu_path / LOAD_DIR); - GenerateYuzuPath(YuzuPath::LogDir, yuzu_path / LOG_DIR); - GenerateYuzuPath(YuzuPath::NANDDir, yuzu_path / NAND_DIR); - GenerateYuzuPath(YuzuPath::PlayTimeDir, yuzu_path / PLAY_TIME_DIR); - GenerateYuzuPath(YuzuPath::ScreenshotsDir, yuzu_path / SCREENSHOTS_DIR); - GenerateYuzuPath(YuzuPath::SDMCDir, yuzu_path / SDMC_DIR); - GenerateYuzuPath(YuzuPath::ShaderDir, yuzu_path / SHADER_DIR); - GenerateYuzuPath(YuzuPath::TASDir, yuzu_path / TAS_DIR); - GenerateYuzuPath(YuzuPath::IconsDir, yuzu_path / ICONS_DIR); + GenerateSuyuPath(SuyuPath::SuyuDir, suyu_path); + GenerateSuyuPath(SuyuPath::AmiiboDir, suyu_path / AMIIBO_DIR); + GenerateSuyuPath(SuyuPath::CacheDir, suyu_path_cache); + GenerateSuyuPath(SuyuPath::ConfigDir, suyu_path_config); + GenerateSuyuPath(SuyuPath::CrashDumpsDir, suyu_path / CRASH_DUMPS_DIR); + GenerateSuyuPath(SuyuPath::DumpDir, suyu_path / DUMP_DIR); + GenerateSuyuPath(SuyuPath::KeysDir, suyu_path / KEYS_DIR); + GenerateSuyuPath(SuyuPath::LoadDir, suyu_path / LOAD_DIR); + GenerateSuyuPath(SuyuPath::LogDir, suyu_path / LOG_DIR); + GenerateSuyuPath(SuyuPath::NANDDir, suyu_path / NAND_DIR); + GenerateSuyuPath(SuyuPath::PlayTimeDir, suyu_path / PLAY_TIME_DIR); + GenerateSuyuPath(SuyuPath::ScreenshotsDir, suyu_path / SCREENSHOTS_DIR); + GenerateSuyuPath(SuyuPath::SDMCDir, suyu_path / SDMC_DIR); + GenerateSuyuPath(SuyuPath::ShaderDir, suyu_path / SHADER_DIR); + GenerateSuyuPath(SuyuPath::TASDir, suyu_path / TAS_DIR); + GenerateSuyuPath(SuyuPath::IconsDir, suyu_path / ICONS_DIR); } private: @@ -140,13 +140,13 @@ private: ~PathManagerImpl() = default; - void GenerateYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { + void GenerateSuyuPath(SuyuPath suyu_path, const fs::path& new_path) { void(FS::CreateDir(new_path)); - SetYuzuPathImpl(yuzu_path, new_path); + SetSuyuPathImpl(suyu_path, new_path); } - std::unordered_map yuzu_paths; + std::unordered_map suyu_paths; }; bool ValidatePath(const fs::path& path) { @@ -230,22 +230,22 @@ void SetAppDirectory(const std::string& app_directory) { PathManagerImpl::GetInstance().Reinitialize(app_directory); } -const fs::path& GetYuzuPath(YuzuPath yuzu_path) { - return PathManagerImpl::GetInstance().GetYuzuPathImpl(yuzu_path); +const fs::path& GetSuyuPath(SuyuPath suyu_path) { + return PathManagerImpl::GetInstance().GetSuyuPathImpl(suyu_path); } -std::string GetYuzuPathString(YuzuPath yuzu_path) { - return PathToUTF8String(GetYuzuPath(yuzu_path)); +std::string GetSuyuPathString(SuyuPath suyu_path) { + return PathToUTF8String(GetSuyuPath(suyu_path)); } -void SetYuzuPath(YuzuPath yuzu_path, const fs::path& new_path) { +void SetSuyuPath(SuyuPath suyu_path, const fs::path& new_path) { if (!FS::IsDir(new_path)) { LOG_ERROR(Common_Filesystem, "Filesystem object at new_path={} is not a directory", PathToUTF8String(new_path)); return; } - PathManagerImpl::GetInstance().SetYuzuPathImpl(yuzu_path, new_path); + PathManagerImpl::GetInstance().SetSuyuPathImpl(suyu_path, new_path); } #ifdef _WIN32 diff --git a/src/common/fs/path_util.h b/src/common/fs/path_util.h index 59301e7edd..1fcb7d3778 100644 --- a/src/common/fs/path_util.h +++ b/src/common/fs/path_util.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -10,8 +10,8 @@ namespace Common::FS { -enum class YuzuPath { - YuzuDir, // Where yuzu stores its data. +enum class SuyuPath { + SuyuDir, // Where suyu stores its data. AmiiboDir, // Where Amiibo backups are stored. CacheDir, // Where cached filesystem data is stored. ConfigDir, // Where config files are stored. @@ -22,7 +22,7 @@ enum class YuzuPath { LogDir, // Where log files are stored. NANDDir, // Where the emulated NAND is stored. PlayTimeDir, // Where play time data is stored. - ScreenshotsDir, // Where yuzu screenshots are stored. + ScreenshotsDir, // Where suyu screenshots are stored. SDMCDir, // Where the emulated SDMC is stored. ShaderDir, // Where shaders are stored. TASDir, // Where TAS scripts are stored. @@ -193,39 +193,39 @@ template void SetAppDirectory(const std::string& app_directory); /** - * Gets the filesystem path associated with the YuzuPath enum. + * Gets the filesystem path associated with the SuyuPath enum. * - * @param yuzu_path YuzuPath enum + * @param suyu_path SuyuPath enum * - * @returns The filesystem path associated with the YuzuPath enum. + * @returns The filesystem path associated with the SuyuPath enum. */ -[[nodiscard]] const std::filesystem::path& GetYuzuPath(YuzuPath yuzu_path); +[[nodiscard]] const std::filesystem::path& GetSuyuPath(SuyuPath suyu_path); /** - * Gets the filesystem path associated with the YuzuPath enum as a UTF-8 encoded std::string. + * Gets the filesystem path associated with the SuyuPath enum as a UTF-8 encoded std::string. * - * @param yuzu_path YuzuPath enum + * @param suyu_path SuyuPath enum * - * @returns The filesystem path associated with the YuzuPath enum as a UTF-8 encoded std::string. + * @returns The filesystem path associated with the SuyuPath enum as a UTF-8 encoded std::string. */ -[[nodiscard]] std::string GetYuzuPathString(YuzuPath yuzu_path); +[[nodiscard]] std::string GetSuyuPathString(SuyuPath suyu_path); /** - * Sets a new filesystem path associated with the YuzuPath enum. + * Sets a new filesystem path associated with the SuyuPath enum. * If the filesystem object at new_path is not a directory, this function will not do anything. * - * @param yuzu_path YuzuPath enum + * @param suyu_path SuyuPath enum * @param new_path New filesystem path */ -void SetYuzuPath(YuzuPath yuzu_path, const std::filesystem::path& new_path); +void SetSuyuPath(SuyuPath suyu_path, const std::filesystem::path& new_path); #ifdef _WIN32 template -void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) { +void SetSuyuPath(SuyuPath suyu_path, const Path& new_path) { if constexpr (IsChar) { - SetYuzuPath(yuzu_path, ToU8String(new_path)); + SetSuyuPath(suyu_path, ToU8String(new_path)); } else { - SetYuzuPath(yuzu_path, std::filesystem::path{new_path}); + SetSuyuPath(suyu_path, std::filesystem::path{new_path}); } } #endif @@ -257,14 +257,14 @@ void SetYuzuPath(YuzuPath yuzu_path, const Path& new_path) { [[nodiscard]] std::filesystem::path GetHomeDirectory(); /** - * Gets the relevant paths for yuzu to store its data based on the given XDG environment variable. + * Gets the relevant paths for suyu to store its data based on the given XDG environment variable. * See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html * Defaults to $HOME/.local/share for main application data, * $HOME/.cache for cached data, and $HOME/.config for configuration files. * * @param env_name XDG environment variable name * - * @returns The path where yuzu should store its data. + * @returns The path where suyu should store its data. */ [[nodiscard]] std::filesystem::path GetDataDirectory(const std::string& env_name); @@ -288,11 +288,11 @@ enum class DirectorySeparator { }; // Splits the path on '/' or '\' and put the components into a vector -// i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } +// i.e. "C:\Users\Suyu\Documents\save.bin" becomes {"C:", "Users", "Suyu", "Documents", "save.bin" } [[nodiscard]] std::vector SplitPathComponents(std::string_view filename); // Splits the path on '/' or '\' and put the components into a vector -// i.e. "C:\Users\Yuzu\Documents\save.bin" becomes {"C:", "Users", "Yuzu", "Documents", "save.bin" } +// i.e. "C:\Users\Suyu\Documents\save.bin" becomes {"C:", "Users", "Suyu", "Documents", "save.bin" } [[nodiscard]] std::vector SplitPathComponentsCopy(std::string_view filename); // Removes trailing slash, makes all '\\' into '/', and removes duplicate '/'. Makes '/' into '\\' diff --git a/src/common/intrusive_list.h b/src/common/intrusive_list.h index d330dc1c22..0867849a23 100644 --- a/src/common/intrusive_list.h +++ b/src/common/intrusive_list.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -16,7 +16,7 @@ class IntrusiveListImpl; } class IntrusiveListNode { - YUZU_NON_COPYABLE(IntrusiveListNode); + SUYU_NON_COPYABLE(IntrusiveListNode); private: friend class impl::IntrusiveListImpl; @@ -96,7 +96,7 @@ private: namespace impl { class IntrusiveListImpl { - YUZU_NON_COPYABLE(IntrusiveListImpl); + SUYU_NON_COPYABLE(IntrusiveListImpl); private: IntrusiveListNode m_root_node; @@ -302,7 +302,7 @@ private: template class IntrusiveList { - YUZU_NON_COPYABLE(IntrusiveList); + SUYU_NON_COPYABLE(IntrusiveList); private: impl::IntrusiveListImpl m_impl; diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index bc2940fa0a..6809acb47d 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -17,7 +17,7 @@ class IntrusiveRedBlackTreeImpl; #pragma pack(push, 4) struct IntrusiveRedBlackTreeNode { - YUZU_NON_COPYABLE(IntrusiveRedBlackTreeNode); + SUYU_NON_COPYABLE(IntrusiveRedBlackTreeNode); public: using RBEntry = freebsd::RBEntry; @@ -49,7 +49,7 @@ class IntrusiveRedBlackTree; namespace impl { class IntrusiveRedBlackTreeImpl { - YUZU_NON_COPYABLE(IntrusiveRedBlackTreeImpl); + SUYU_NON_COPYABLE(IntrusiveRedBlackTreeImpl); private: template @@ -261,7 +261,7 @@ using RedBlackKeyType = std::remove_pointer_t class IntrusiveRedBlackTree { - YUZU_NON_COPYABLE(IntrusiveRedBlackTree); + SUYU_NON_COPYABLE(IntrusiveRedBlackTree); public: using ImplType = impl::IntrusiveRedBlackTreeImpl; diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 7a267f8c06..c64a0d5944 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -195,7 +195,7 @@ public: return; } using namespace Common::FS; - const auto& log_dir = GetYuzuPath(YuzuPath::LogDir); + const auto& log_dir = GetSuyuPath(SuyuPath::LogDir); void(CreateDir(log_dir)); Filter filter; filter.ParseFilterString(Settings::values.log_filter.GetValue()); diff --git a/src/common/nvidia_flags.cpp b/src/common/nvidia_flags.cpp index fa37477821..579d2b9407 100644 --- a/src/common/nvidia_flags.cpp +++ b/src/common/nvidia_flags.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -14,7 +14,7 @@ namespace Common { void ConfigureNvidiaEnvironmentFlags() { #ifdef _WIN32 const auto nvidia_shader_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir) / "nvidia"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir) / "nvidia"; if (!Common::FS::CreateDirs(nvidia_shader_dir)) { return; diff --git a/src/common/scope_exit.h b/src/common/scope_exit.h index f3e88cde95..3d6bef8f57 100644 --- a/src/common/scope_exit.h +++ b/src/common/scope_exit.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -9,7 +9,7 @@ namespace detail { template class ScopeGuard { - YUZU_NON_COPYABLE(ScopeGuard); + SUYU_NON_COPYABLE(ScopeGuard); private: F f; diff --git a/src/common/settings.cpp b/src/common/settings.cpp index 80d388fe88..4896ba2784 100644 --- a/src/common/settings.cpp +++ b/src/common/settings.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -130,11 +130,11 @@ void LogSettings() { log_setting(name, setting->Canonicalize()); } } - log_path("DataStorage_CacheDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir)); - log_path("DataStorage_ConfigDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir)); - log_path("DataStorage_LoadDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::LoadDir)); - log_path("DataStorage_NANDDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir)); - log_path("DataStorage_SDMCDir", Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir)); + log_path("DataStorage_CacheDir", Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir)); + log_path("DataStorage_ConfigDir", Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir)); + log_path("DataStorage_LoadDir", Common::FS::GetSuyuPath(Common::FS::SuyuPath::LoadDir)); + log_path("DataStorage_NANDDir", Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir)); + log_path("DataStorage_SDMCDir", Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir)); } void UpdateGPUAccuracy() { diff --git a/src/common/settings.h b/src/common/settings.h index a0f6cdb570..dad57e4210 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -1,6 +1,8 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// Modified by palfaiate on <2024/03/07> + #pragma once #include diff --git a/src/common/telemetry.h b/src/common/telemetry.h index ba633d5a5e..f6489bda95 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2017 Citra Emulator Project +// SPDX-FileCopyrightText: 2017 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -52,7 +52,7 @@ public: template class Field : public FieldInterface { public: - YUZU_NON_COPYABLE(Field); + SUYU_NON_COPYABLE(Field); Field(FieldType type_, std::string_view name_, T value_) : name(name_), type(type_), value(std::move(value_)) {} @@ -101,7 +101,7 @@ private: */ class FieldCollection final { public: - YUZU_NON_COPYABLE(FieldCollection); + SUYU_NON_COPYABLE(FieldCollection); FieldCollection() = default; ~FieldCollection() = default; @@ -168,7 +168,7 @@ struct VisitorInterface { * backend implementation is not available. */ struct NullVisitor final : public VisitorInterface { - YUZU_NON_COPYABLE(NullVisitor); + SUYU_NON_COPYABLE(NullVisitor); NullVisitor() = default; ~NullVisitor() override = default; diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 495963eefd..741113bf8e 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -47,8 +47,8 @@ enum class Architecture { /// Generic ARMv8 CPU interface class ArmInterface { public: - YUZU_NON_COPYABLE(ArmInterface); - YUZU_NON_MOVEABLE(ArmInterface); + SUYU_NON_COPYABLE(ArmInterface); + SUYU_NON_MOVEABLE(ArmInterface); explicit ArmInterface(bool uses_wall_clock) : m_uses_wall_clock{uses_wall_clock} {} virtual ~ArmInterface() = default; diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index c6215c8aad..6b64a75d7c 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -372,7 +372,7 @@ Key128 DeriveKeyblobMACKey(const Key128& keyblob_key, const Key128& mac_source) std::optional DeriveSDSeed() { const auto system_save_43_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000043"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000043"; const Common::FS::IOFile save_43{system_save_43_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -381,7 +381,7 @@ std::optional DeriveSDSeed() { } const auto sd_private_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "Nintendo/Contents/private"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "Nintendo/Contents/private"; const Common::FS::IOFile sd_private{sd_private_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -640,7 +640,7 @@ KeyManager::KeyManager() { void KeyManager::ReloadKeys() { // Initialize keys - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); if (!Common::FS::CreateDir(yuzu_keys_dir)) { LOG_ERROR(Core, "Failed to create the keys directory."); @@ -861,7 +861,7 @@ void KeyManager::SetKey(S256KeyType id, Key256 key, u64 field1, u64 field2) { } bool KeyManager::KeyFileExists(bool title) { - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); if (title) { return Common::FS::Exists(yuzu_keys_dir / "title.keys"); @@ -1108,7 +1108,7 @@ void KeyManager::PopulateTickets() { std::vector tickets; const auto system_save_e1_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e1"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/80000000000000e1"; if (Common::FS::Exists(system_save_e1_path)) { const Common::FS::IOFile save_e1{system_save_e1_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; @@ -1117,7 +1117,7 @@ void KeyManager::PopulateTickets() { } const auto system_save_e2_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e2"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/80000000000000e2"; if (Common::FS::Exists(system_save_e2_path)) { const Common::FS::IOFile save_e2{system_save_e2_path, Common::FS::FileAccessMode::Read, Common::FS::FileType::BinaryFile}; diff --git a/src/core/file_sys/bis_factory.cpp b/src/core/file_sys/bis_factory.cpp index db667438e3..a893fad8a3 100644 --- a/src/core/file_sys/bis_factory.cpp +++ b/src/core/file_sys/bis_factory.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -83,7 +83,7 @@ VirtualFile BISFactory::OpenPartitionStorage(BisPartitionId id, VirtualFilesystem file_system) const { auto& keys = Core::Crypto::KeyManager::Instance(); Core::Crypto::PartitionDataManager pdm{file_system->OpenDirectory( - Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir), OpenMode::Read)}; + Common::FS::GetSuyuPathString(Common::FS::SuyuPath::NANDDir), OpenMode::Read)}; keys.PopulateFromPartitionData(pdm); switch (id) { diff --git a/src/core/file_sys/fs_path.h b/src/core/file_sys/fs_path.h index 1566e82b9d..a4004c2161 100644 --- a/src/core/file_sys/fs_path.h +++ b/src/core/file_sys/fs_path.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -15,8 +15,8 @@ namespace FileSys { class DirectoryPathParser; class Path { - YUZU_NON_COPYABLE(Path); - YUZU_NON_MOVEABLE(Path); + SUYU_NON_COPYABLE(Path); + SUYU_NON_MOVEABLE(Path); private: static constexpr const char* EmptyPath = ""; @@ -27,7 +27,7 @@ private: public: class WriteBuffer { - YUZU_NON_COPYABLE(WriteBuffer); + SUYU_NON_COPYABLE(WriteBuffer); private: char* m_buffer; diff --git a/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h b/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h index d0e9ceed05..0f53e3f669 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -14,8 +14,8 @@ namespace FileSys { using namespace Common::Literals; class AesCtrCounterExtendedStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(AesCtrCounterExtendedStorage); - YUZU_NON_MOVEABLE(AesCtrCounterExtendedStorage); + SUYU_NON_COPYABLE(AesCtrCounterExtendedStorage); + SUYU_NON_MOVEABLE(AesCtrCounterExtendedStorage); public: static constexpr size_t BlockSize = 0x10; diff --git a/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h b/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h index 5abd93d33c..7838f982c6 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_ctr_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -14,8 +14,8 @@ namespace FileSys { class AesCtrStorage : public IStorage { - YUZU_NON_COPYABLE(AesCtrStorage); - YUZU_NON_MOVEABLE(AesCtrStorage); + SUYU_NON_COPYABLE(AesCtrStorage); + SUYU_NON_MOVEABLE(AesCtrStorage); public: static constexpr size_t BlockSize = 0x10; diff --git a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h index 0e83ca1b95..c03f5d8b43 100644 --- a/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h +++ b/src/core/file_sys/fssystem/fssystem_aes_xts_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -13,8 +13,8 @@ namespace FileSys { class AesXtsStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(AesXtsStorage); - YUZU_NON_MOVEABLE(AesXtsStorage); + SUYU_NON_COPYABLE(AesXtsStorage); + SUYU_NON_MOVEABLE(AesXtsStorage); public: static constexpr size_t AesBlockSize = 0x10; diff --git a/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h b/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h index f96691d03d..f5faee0ca1 100644 --- a/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h +++ b/src/core/file_sys/fssystem/fssystem_alignment_matching_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -13,8 +13,8 @@ namespace FileSys { template class AlignmentMatchingStorage : public IStorage { - YUZU_NON_COPYABLE(AlignmentMatchingStorage); - YUZU_NON_MOVEABLE(AlignmentMatchingStorage); + SUYU_NON_COPYABLE(AlignmentMatchingStorage); + SUYU_NON_MOVEABLE(AlignmentMatchingStorage); public: static constexpr size_t DataAlign = DataAlign_; @@ -77,8 +77,8 @@ public: template class AlignmentMatchingStoragePooledBuffer : public IStorage { - YUZU_NON_COPYABLE(AlignmentMatchingStoragePooledBuffer); - YUZU_NON_MOVEABLE(AlignmentMatchingStoragePooledBuffer); + SUYU_NON_COPYABLE(AlignmentMatchingStoragePooledBuffer); + SUYU_NON_MOVEABLE(AlignmentMatchingStoragePooledBuffer); public: static constexpr size_t BufferAlign = BufferAlign_; diff --git a/src/core/file_sys/fssystem/fssystem_bucket_tree.h b/src/core/file_sys/fssystem/fssystem_bucket_tree.h index 3a5e21d1a4..89996f64b4 100644 --- a/src/core/file_sys/fssystem/fssystem_bucket_tree.h +++ b/src/core/file_sys/fssystem/fssystem_bucket_tree.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -18,8 +18,8 @@ namespace FileSys { using namespace Common::Literals; class BucketTree { - YUZU_NON_COPYABLE(BucketTree); - YUZU_NON_MOVEABLE(BucketTree); + SUYU_NON_COPYABLE(BucketTree); + SUYU_NON_MOVEABLE(BucketTree); public: static constexpr u32 Magic = Common::MakeMagic('B', 'K', 'T', 'R'); @@ -123,7 +123,7 @@ public: private: class NodeBuffer { - YUZU_NON_COPYABLE(NodeBuffer); + SUYU_NON_COPYABLE(NodeBuffer); public: NodeBuffer() : m_header() {} @@ -330,8 +330,8 @@ private: }; class BucketTree::Visitor { - YUZU_NON_COPYABLE(Visitor); - YUZU_NON_MOVEABLE(Visitor); + SUYU_NON_COPYABLE(Visitor); + SUYU_NON_MOVEABLE(Visitor); public: constexpr Visitor() diff --git a/src/core/file_sys/fssystem/fssystem_compressed_storage.h b/src/core/file_sys/fssystem/fssystem_compressed_storage.h index 74c98630ec..93a4b94972 100644 --- a/src/core/file_sys/fssystem/fssystem_compressed_storage.h +++ b/src/core/file_sys/fssystem/fssystem_compressed_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -17,8 +17,8 @@ namespace FileSys { using namespace Common::Literals; class CompressedStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(CompressedStorage); - YUZU_NON_MOVEABLE(CompressedStorage); + SUYU_NON_COPYABLE(CompressedStorage); + SUYU_NON_MOVEABLE(CompressedStorage); public: static constexpr size_t NodeSize = 16_KiB; @@ -47,8 +47,8 @@ public: private: class CompressedStorageCore { - YUZU_NON_COPYABLE(CompressedStorageCore); - YUZU_NON_MOVEABLE(CompressedStorageCore); + SUYU_NON_COPYABLE(CompressedStorageCore); + SUYU_NON_MOVEABLE(CompressedStorageCore); public: CompressedStorageCore() : m_table(), m_data_storage() {} @@ -674,8 +674,8 @@ private: }; class CacheManager { - YUZU_NON_COPYABLE(CacheManager); - YUZU_NON_MOVEABLE(CacheManager); + SUYU_NON_COPYABLE(CacheManager); + SUYU_NON_MOVEABLE(CacheManager); private: struct AccessRange { diff --git a/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h b/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h index bd129db47a..4ce5603706 100644 --- a/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h +++ b/src/core/file_sys/fssystem/fssystem_hierarchical_integrity_verification_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -57,8 +57,8 @@ struct HierarchicalIntegrityVerificationSizeSet { static_assert(std::is_trivial_v); class HierarchicalIntegrityVerificationStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(HierarchicalIntegrityVerificationStorage); - YUZU_NON_MOVEABLE(HierarchicalIntegrityVerificationStorage); + SUYU_NON_COPYABLE(HierarchicalIntegrityVerificationStorage); + SUYU_NON_MOVEABLE(HierarchicalIntegrityVerificationStorage); public: using GenerateRandomFunction = void (*)(void* dst, size_t size); diff --git a/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h b/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h index 41d3960b8b..31b26f164e 100644 --- a/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h +++ b/src/core/file_sys/fssystem/fssystem_hierarchical_sha256_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -12,8 +12,8 @@ namespace FileSys { class HierarchicalSha256Storage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(HierarchicalSha256Storage); - YUZU_NON_MOVEABLE(HierarchicalSha256Storage); + SUYU_NON_COPYABLE(HierarchicalSha256Storage); + SUYU_NON_MOVEABLE(HierarchicalSha256Storage); public: static constexpr s32 LayerCount = 3; diff --git a/src/core/file_sys/fssystem/fssystem_indirect_storage.h b/src/core/file_sys/fssystem/fssystem_indirect_storage.h index d4b95fd273..7b1a6bd54e 100644 --- a/src/core/file_sys/fssystem/fssystem_indirect_storage.h +++ b/src/core/file_sys/fssystem/fssystem_indirect_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -13,8 +13,8 @@ namespace FileSys { class IndirectStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(IndirectStorage); - YUZU_NON_MOVEABLE(IndirectStorage); + SUYU_NON_COPYABLE(IndirectStorage); + SUYU_NON_MOVEABLE(IndirectStorage); public: static constexpr s32 StorageCount = 2; diff --git a/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h b/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h index 09f76799db..9328901bc5 100644 --- a/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h +++ b/src/core/file_sys/fssystem/fssystem_integrity_verification_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -11,8 +11,8 @@ namespace FileSys { class IntegrityVerificationStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(IntegrityVerificationStorage); - YUZU_NON_MOVEABLE(IntegrityVerificationStorage); + SUYU_NON_COPYABLE(IntegrityVerificationStorage); + SUYU_NON_MOVEABLE(IntegrityVerificationStorage); public: static constexpr s64 HashSize = 256 / 8; diff --git a/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h b/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h index c07a127fb3..9f1e4cc1e8 100644 --- a/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h +++ b/src/core/file_sys/fssystem/fssystem_memory_resource_buffer_hold_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -8,8 +8,8 @@ namespace FileSys { class MemoryResourceBufferHoldStorage : public IStorage { - YUZU_NON_COPYABLE(MemoryResourceBufferHoldStorage); - YUZU_NON_MOVEABLE(MemoryResourceBufferHoldStorage); + SUYU_NON_COPYABLE(MemoryResourceBufferHoldStorage); + SUYU_NON_MOVEABLE(MemoryResourceBufferHoldStorage); public: MemoryResourceBufferHoldStorage(VirtualFile storage, size_t buffer_size) diff --git a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp index ab5a7984e3..a2b9d27de5 100644 --- a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp +++ b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/file_sys/fssystem/fssystem_aes_ctr_counter_extended_storage.h" @@ -28,8 +28,8 @@ constexpr inline s32 IntegrityDataCacheCountForMeta = 16; constexpr inline s32 IntegrityHashCacheCountForMeta = 2; class SharedNcaBodyStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(SharedNcaBodyStorage); - YUZU_NON_MOVEABLE(SharedNcaBodyStorage); + SUYU_NON_COPYABLE(SharedNcaBodyStorage); + SUYU_NON_MOVEABLE(SharedNcaBodyStorage); private: VirtualFile m_storage; diff --git a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h index 5bc838de64..34a04bffe1 100644 --- a/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h +++ b/src/core/file_sys/fssystem/fssystem_nca_file_system_driver.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -88,8 +88,8 @@ constexpr inline s32 GetKeyTypeValue(u8 key_index, u8 key_generation) { } class NcaReader { - YUZU_NON_COPYABLE(NcaReader); - YUZU_NON_MOVEABLE(NcaReader); + SUYU_NON_COPYABLE(NcaReader); + SUYU_NON_MOVEABLE(NcaReader); public: NcaReader(); @@ -154,8 +154,8 @@ private: }; class NcaFsHeaderReader { - YUZU_NON_COPYABLE(NcaFsHeaderReader); - YUZU_NON_MOVEABLE(NcaFsHeaderReader); + SUYU_NON_COPYABLE(NcaFsHeaderReader); + SUYU_NON_MOVEABLE(NcaFsHeaderReader); public: NcaFsHeaderReader() : m_fs_index(-1) { @@ -207,8 +207,8 @@ private: }; class NcaFileSystemDriver { - YUZU_NON_COPYABLE(NcaFileSystemDriver); - YUZU_NON_MOVEABLE(NcaFileSystemDriver); + SUYU_NON_COPYABLE(NcaFileSystemDriver); + SUYU_NON_MOVEABLE(NcaFileSystemDriver); public: struct StorageContext { diff --git a/src/core/file_sys/fssystem/fssystem_pooled_buffer.h b/src/core/file_sys/fssystem/fssystem_pooled_buffer.h index 9a6adbcb5a..2a084ec45f 100644 --- a/src/core/file_sys/fssystem/fssystem_pooled_buffer.h +++ b/src/core/file_sys/fssystem/fssystem_pooled_buffer.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -16,7 +16,7 @@ constexpr inline size_t BufferPoolAlignment = 4_KiB; constexpr inline size_t BufferPoolWorkSize = 320; class PooledBuffer { - YUZU_NON_COPYABLE(PooledBuffer); + SUYU_NON_COPYABLE(PooledBuffer); public: // Constructor/Destructor. diff --git a/src/core/file_sys/fssystem/fssystem_sparse_storage.h b/src/core/file_sys/fssystem/fssystem_sparse_storage.h index 6c196ec611..d0761cd385 100644 --- a/src/core/file_sys/fssystem/fssystem_sparse_storage.h +++ b/src/core/file_sys/fssystem/fssystem_sparse_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -8,8 +8,8 @@ namespace FileSys { class SparseStorage : public IndirectStorage { - YUZU_NON_COPYABLE(SparseStorage); - YUZU_NON_MOVEABLE(SparseStorage); + SUYU_NON_COPYABLE(SparseStorage); + SUYU_NON_MOVEABLE(SparseStorage); private: class ZeroStorage : public IReadOnlyStorage { diff --git a/src/core/file_sys/fssystem/fssystem_switch_storage.h b/src/core/file_sys/fssystem/fssystem_switch_storage.h index 2b43927cb5..9de6fbe936 100644 --- a/src/core/file_sys/fssystem/fssystem_switch_storage.h +++ b/src/core/file_sys/fssystem/fssystem_switch_storage.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -8,8 +8,8 @@ namespace FileSys { class RegionSwitchStorage : public IReadOnlyStorage { - YUZU_NON_COPYABLE(RegionSwitchStorage); - YUZU_NON_MOVEABLE(RegionSwitchStorage); + SUYU_NON_COPYABLE(RegionSwitchStorage); + SUYU_NON_MOVEABLE(RegionSwitchStorage); public: struct Region { diff --git a/src/core/file_sys/vfs/vfs.h b/src/core/file_sys/vfs/vfs.h index f846a9669c..ec04cd8069 100644 --- a/src/core/file_sys/vfs/vfs.h +++ b/src/core/file_sys/vfs/vfs.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -30,8 +30,8 @@ enum class VfsEntryType { // functionality, they will need to override. class VfsFilesystem { public: - YUZU_NON_COPYABLE(VfsFilesystem); - YUZU_NON_MOVEABLE(VfsFilesystem); + SUYU_NON_COPYABLE(VfsFilesystem); + SUYU_NON_MOVEABLE(VfsFilesystem); explicit VfsFilesystem(VirtualDir root); virtual ~VfsFilesystem(); @@ -81,8 +81,8 @@ protected: // A class representing a file in an abstract filesystem. class VfsFile { public: - YUZU_NON_COPYABLE(VfsFile); - YUZU_NON_MOVEABLE(VfsFile); + SUYU_NON_COPYABLE(VfsFile); + SUYU_NON_MOVEABLE(VfsFile); VfsFile() = default; virtual ~VfsFile(); @@ -184,8 +184,8 @@ public: // A class representing a directory in an abstract filesystem. class VfsDirectory { public: - YUZU_NON_COPYABLE(VfsDirectory); - YUZU_NON_MOVEABLE(VfsDirectory); + SUYU_NON_COPYABLE(VfsDirectory); + SUYU_NON_MOVEABLE(VfsDirectory); VfsDirectory() = default; virtual ~VfsDirectory(); diff --git a/src/core/hle/kernel/k_auto_object.h b/src/core/hle/kernel/k_auto_object.h index 8d4e0df44f..3ec056119b 100644 --- a/src/core/hle/kernel/k_auto_object.h +++ b/src/core/hle/kernel/k_auto_object.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -27,8 +27,8 @@ private: static constexpr inline ClassTokenType ClassToken() { return ::Kernel::ClassToken; } \ \ public: \ - YUZU_NON_COPYABLE(CLASS); \ - YUZU_NON_MOVEABLE(CLASS); \ + SUYU_NON_COPYABLE(CLASS); \ + SUYU_NON_MOVEABLE(CLASS); \ \ using BaseClass = BASE_CLASS; \ static constexpr TypeObj GetStaticTypeObj() { \ @@ -211,7 +211,7 @@ private: template class KScopedAutoObject { public: - YUZU_NON_COPYABLE(KScopedAutoObject); + SUYU_NON_COPYABLE(KScopedAutoObject); constexpr KScopedAutoObject() = default; diff --git a/src/core/hle/kernel/k_auto_object_container.h b/src/core/hle/kernel/k_auto_object_container.h index 770743d21b..bee5a5f304 100644 --- a/src/core/hle/kernel/k_auto_object_container.h +++ b/src/core/hle/kernel/k_auto_object_container.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -16,8 +16,8 @@ class KProcess; class KAutoObjectWithListContainer { public: - YUZU_NON_COPYABLE(KAutoObjectWithListContainer); - YUZU_NON_MOVEABLE(KAutoObjectWithListContainer); + SUYU_NON_COPYABLE(KAutoObjectWithListContainer); + SUYU_NON_MOVEABLE(KAutoObjectWithListContainer); using ListType = boost::intrusive::rbtree; diff --git a/src/core/hle/kernel/k_dynamic_resource_manager.h b/src/core/hle/kernel/k_dynamic_resource_manager.h index b6a27d648f..55347979b2 100644 --- a/src/core/hle/kernel/k_dynamic_resource_manager.h +++ b/src/core/hle/kernel/k_dynamic_resource_manager.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -12,8 +12,8 @@ namespace Kernel { template class KDynamicResourceManager { - YUZU_NON_COPYABLE(KDynamicResourceManager); - YUZU_NON_MOVEABLE(KDynamicResourceManager); + SUYU_NON_COPYABLE(KDynamicResourceManager); + SUYU_NON_MOVEABLE(KDynamicResourceManager); public: using DynamicSlabType = KDynamicSlabHeap; diff --git a/src/core/hle/kernel/k_dynamic_slab_heap.h b/src/core/hle/kernel/k_dynamic_slab_heap.h index 76ed4cac1f..4f3de7046d 100644 --- a/src/core/hle/kernel/k_dynamic_slab_heap.h +++ b/src/core/hle/kernel/k_dynamic_slab_heap.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -13,8 +13,8 @@ namespace Kernel { template class KDynamicSlabHeap : protected impl::KSlabHeapImpl { - YUZU_NON_COPYABLE(KDynamicSlabHeap); - YUZU_NON_MOVEABLE(KDynamicSlabHeap); + SUYU_NON_COPYABLE(KDynamicSlabHeap); + SUYU_NON_MOVEABLE(KDynamicSlabHeap); public: constexpr KDynamicSlabHeap() = default; diff --git a/src/core/hle/kernel/k_handle_table.h b/src/core/hle/kernel/k_handle_table.h index 1bf68e6b04..91d5b71009 100644 --- a/src/core/hle/kernel/k_handle_table.h +++ b/src/core/hle/kernel/k_handle_table.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -21,8 +21,8 @@ namespace Kernel { class KernelCore; class KHandleTable { - YUZU_NON_COPYABLE(KHandleTable); - YUZU_NON_MOVEABLE(KHandleTable); + SUYU_NON_COPYABLE(KHandleTable); + SUYU_NON_MOVEABLE(KHandleTable); public: static constexpr size_t MaxTableSize = 1024; diff --git a/src/core/hle/kernel/k_memory_region.h b/src/core/hle/kernel/k_memory_region.h index e3044f0227..44c7343156 100644 --- a/src/core/hle/kernel/k_memory_region.h +++ b/src/core/hle/kernel/k_memory_region.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -17,8 +17,8 @@ class KMemoryRegion final : public Common::IntrusiveRedBlackTreeBaseNode::TreeType; public: - YUZU_NON_COPYABLE(KMemoryRegionTree); - YUZU_NON_MOVEABLE(KMemoryRegionTree); + SUYU_NON_COPYABLE(KMemoryRegionTree); + SUYU_NON_MOVEABLE(KMemoryRegionTree); using value_type = TreeType::value_type; using size_type = TreeType::size_type; @@ -327,8 +327,8 @@ private: class KMemoryRegionAllocator final { public: - YUZU_NON_COPYABLE(KMemoryRegionAllocator); - YUZU_NON_MOVEABLE(KMemoryRegionAllocator); + SUYU_NON_COPYABLE(KMemoryRegionAllocator); + SUYU_NON_MOVEABLE(KMemoryRegionAllocator); static constexpr size_t MaxMemoryRegions = 200; diff --git a/src/core/hle/kernel/k_page_table_base.cpp b/src/core/hle/kernel/k_page_table_base.cpp index 19cdf4f3ac..25af39c856 100644 --- a/src/core/hle/kernel/k_page_table_base.cpp +++ b/src/core/hle/kernel/k_page_table_base.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/scope_exit.h" @@ -14,8 +14,8 @@ namespace Kernel { namespace { class KScopedLightLockPair { - YUZU_NON_COPYABLE(KScopedLightLockPair); - YUZU_NON_MOVEABLE(KScopedLightLockPair); + SUYU_NON_COPYABLE(KScopedLightLockPair); + SUYU_NON_MOVEABLE(KScopedLightLockPair); private: KLightLock* m_lower; diff --git a/src/core/hle/kernel/k_page_table_base.h b/src/core/hle/kernel/k_page_table_base.h index 748419f862..819502d0a0 100644 --- a/src/core/hle/kernel/k_page_table_base.h +++ b/src/core/hle/kernel/k_page_table_base.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -49,8 +49,8 @@ class KResourceLimit; class KSystemResource; class KPageTableBase { - YUZU_NON_COPYABLE(KPageTableBase); - YUZU_NON_MOVEABLE(KPageTableBase); + SUYU_NON_COPYABLE(KPageTableBase); + SUYU_NON_MOVEABLE(KPageTableBase); public: using TraversalEntry = Common::PageTable::TraversalEntry; diff --git a/src/core/hle/kernel/k_scheduler.h b/src/core/hle/kernel/k_scheduler.h index d85a0c0408..20347124f8 100644 --- a/src/core/hle/kernel/k_scheduler.h +++ b/src/core/hle/kernel/k_scheduler.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -33,8 +33,8 @@ class KScopedSchedulerLockAndSleep; class KScheduler final { public: - YUZU_NON_COPYABLE(KScheduler); - YUZU_NON_MOVEABLE(KScheduler); + SUYU_NON_COPYABLE(KScheduler); + SUYU_NON_MOVEABLE(KScheduler); using LockType = KAbstractSchedulerLock; diff --git a/src/core/hle/kernel/k_slab_heap.h b/src/core/hle/kernel/k_slab_heap.h index 334afebb71..e1b82597f5 100644 --- a/src/core/hle/kernel/k_slab_heap.h +++ b/src/core/hle/kernel/k_slab_heap.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -18,8 +18,8 @@ class KernelCore; namespace impl { class KSlabHeapImpl { - YUZU_NON_COPYABLE(KSlabHeapImpl); - YUZU_NON_MOVEABLE(KSlabHeapImpl); + SUYU_NON_COPYABLE(KSlabHeapImpl); + SUYU_NON_MOVEABLE(KSlabHeapImpl); public: struct Node { @@ -72,8 +72,8 @@ private: template class KSlabHeapBase : protected impl::KSlabHeapImpl { - YUZU_NON_COPYABLE(KSlabHeapBase); - YUZU_NON_MOVEABLE(KSlabHeapBase); + SUYU_NON_COPYABLE(KSlabHeapBase); + SUYU_NON_MOVEABLE(KSlabHeapBase); private: size_t m_obj_size{}; diff --git a/src/core/hle/kernel/k_spin_lock.h b/src/core/hle/kernel/k_spin_lock.h index 094a1e6be0..fde6e250d0 100644 --- a/src/core/hle/kernel/k_spin_lock.h +++ b/src/core/hle/kernel/k_spin_lock.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -14,8 +14,8 @@ class KSpinLock { public: explicit KSpinLock() = default; - YUZU_NON_COPYABLE(KSpinLock); - YUZU_NON_MOVEABLE(KSpinLock); + SUYU_NON_COPYABLE(KSpinLock); + SUYU_NON_MOVEABLE(KSpinLock); void Lock(); void Unlock(); diff --git a/src/core/hle/kernel/physical_core.h b/src/core/hle/kernel/physical_core.h index bae4fe5b88..d3bb4765a1 100644 --- a/src/core/hle/kernel/physical_core.h +++ b/src/core/hle/kernel/physical_core.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -26,8 +26,8 @@ public: PhysicalCore(KernelCore& kernel, std::size_t core_index); ~PhysicalCore(); - YUZU_NON_COPYABLE(PhysicalCore); - YUZU_NON_MOVEABLE(PhysicalCore); + SUYU_NON_COPYABLE(PhysicalCore); + SUYU_NON_MOVEABLE(PhysicalCore); // Execute guest code running on the given thread. void RunThread(KThread* thread); diff --git a/src/core/hle/result.h b/src/core/hle/result.h index 316370266d..9a7c10efae 100644 --- a/src/core/hle/result.h +++ b/src/core/hle/result.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -298,8 +298,8 @@ private: namespace ResultImpl { template class ScopedResultGuard { - YUZU_NON_COPYABLE(ScopedResultGuard); - YUZU_NON_MOVEABLE(ScopedResultGuard); + SUYU_NON_COPYABLE(ScopedResultGuard); + SUYU_NON_MOVEABLE(ScopedResultGuard); private: Result& m_ref; diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index fad111d44d..8dbb902716 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -36,7 +36,7 @@ namespace Service::Account { constexpr std::size_t THUMBNAIL_SIZE = 0x24000; static std::filesystem::path GetImagePath(const Common::UUID& uuid) { - return Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / + return Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString()); } diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index ee9795532d..41434113fe 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -377,7 +377,7 @@ bool ProfileManager::SetProfileBaseAndData(Common::UUID uuid, const ProfileBase& } void ProfileManager::ParseUserSaveFile() { - const auto save_path(FS::GetYuzuPath(FS::YuzuPath::NANDDir) / ACC_SAVE_AVATORS_BASE_PATH / + const auto save_path(FS::GetSuyuPath(FS::SuyuPath::NANDDir) / ACC_SAVE_AVATORS_BASE_PATH / "profiles.dat"); const FS::IOFile save(save_path, FS::FileAccessMode::Read, FS::FileType::BinaryFile); @@ -429,12 +429,12 @@ void ProfileManager::WriteUserSaveFile() { }; } - const auto raw_path(FS::GetYuzuPath(FS::YuzuPath::NANDDir) / "system/save/8000000000000010"); + const auto raw_path(FS::GetSuyuPath(FS::SuyuPath::NANDDir) / "system/save/8000000000000010"); if (FS::IsFile(raw_path) && !FS::RemoveFile(raw_path)) { return; } - const auto save_path(FS::GetYuzuPath(FS::YuzuPath::NANDDir) / ACC_SAVE_AVATORS_BASE_PATH / + const auto save_path(FS::GetSuyuPath(FS::SuyuPath::NANDDir) / ACC_SAVE_AVATORS_BASE_PATH / "profiles.dat"); if (!FS::CreateParentDirs(save_path)) { diff --git a/src/core/hle/service/am/frontend/applet_web_browser.cpp b/src/core/hle/service/am/frontend/applet_web_browser.cpp index 835c20c4e2..d1b65029ac 100644 --- a/src/core/hle/service/am/frontend/applet_web_browser.cpp +++ b/src/core/hle/service/am/frontend/applet_web_browser.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/assert.h" @@ -155,7 +155,7 @@ void ExtractSharedFonts(Core::System& system) { "FontNintendoExtended2.ttf", }; - const auto fonts_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / "fonts"; + const auto fonts_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "fonts"; for (std::size_t i = 0; i < NS::SHARED_FONTS.size(); ++i) { const auto font_file_path = fonts_dir / DECRYPTED_SHARED_FONTS[i]; @@ -415,7 +415,7 @@ void WebBrowser::InitializeOffline() { "system_data", }; - offline_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / + offline_cache_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / fmt::format("offline_web_applet_{}/{:016X}", RESOURCE_TYPES[static_cast(document_kind) - 1], title_id); diff --git a/src/core/hle/service/caps/caps_manager.cpp b/src/core/hle/service/caps/caps_manager.cpp index 7f0bc127f9..093447ff6a 100644 --- a/src/core/hle/service/caps/caps_manager.cpp +++ b/src/core/hle/service/caps/caps_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -303,7 +303,7 @@ void AlbumManager::FindScreenshots() { album_files.clear(); // TODO: Swap this with a blocking operation. - const auto screenshots_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ScreenshotsDir); + const auto screenshots_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ScreenshotsDir); Common::FS::IterateDirEntries( screenshots_dir, [this](const std::filesystem::path& full_path) { @@ -438,7 +438,7 @@ static void PNGToMemory(void* context, void* data, int len) { Result AlbumManager::SaveImage(ApplicationAlbumEntry& out_entry, std::span image, u64 title_id, const AlbumFileDateTime& date) const { const auto screenshot_path = - Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir); + Common::FS::GetSuyuPathString(Common::FS::SuyuPath::ScreenshotsDir); const std::string formatted_date = fmt::format("{:04}-{:02}-{:02}_{:02}-{:02}-{:02}-{:03}", date.year, date.month, date.day, date.hour, date.minute, date.second, 0); diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index ae230afc0e..99435a1d9c 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -346,12 +346,12 @@ std::shared_ptr FileSystemController::OpenSaveDataController std::shared_ptr FileSystemController::CreateSaveDataFactory( ProgramId program_id) { - using YuzuPath = Common::FS::YuzuPath; + using SuyuPath = Common::FS::SuyuPath; const auto rw_mode = FileSys::OpenMode::ReadWrite; auto vfs = system.GetFilesystem(); const auto nand_directory = - vfs->OpenDirectory(Common::FS::GetYuzuPathString(YuzuPath::NANDDir), rw_mode); + vfs->OpenDirectory(Common::FS::GetSuyuPathString(SuyuPath::NANDDir), rw_mode); return std::make_shared(system, program_id, std::move(nand_directory)); } @@ -683,20 +683,20 @@ void FileSystemController::CreateFactories(FileSys::VfsFilesystem& vfs, bool ove sdmc_factory = nullptr; } - using YuzuPath = Common::FS::YuzuPath; - const auto sdmc_dir_path = Common::FS::GetYuzuPath(YuzuPath::SDMCDir); + using SuyuPath = Common::FS::SuyuPath; + const auto sdmc_dir_path = Common::FS::GetSuyuPath(SuyuPath::SDMCDir); const auto sdmc_load_dir_path = sdmc_dir_path / "atmosphere/contents"; const auto rw_mode = FileSys::OpenMode::ReadWrite; auto nand_directory = - vfs.OpenDirectory(Common::FS::GetYuzuPathString(YuzuPath::NANDDir), rw_mode); + vfs.OpenDirectory(Common::FS::GetSuyuPathString(SuyuPath::NANDDir), rw_mode); auto sd_directory = vfs.OpenDirectory(Common::FS::PathToUTF8String(sdmc_dir_path), rw_mode); - auto load_directory = vfs.OpenDirectory(Common::FS::GetYuzuPathString(YuzuPath::LoadDir), + auto load_directory = vfs.OpenDirectory(Common::FS::GetSuyuPathString(SuyuPath::LoadDir), FileSys::OpenMode::Read); auto sd_load_directory = vfs.OpenDirectory(Common::FS::PathToUTF8String(sdmc_load_dir_path), FileSys::OpenMode::Read); auto dump_directory = - vfs.OpenDirectory(Common::FS::GetYuzuPathString(YuzuPath::DumpDir), rw_mode); + vfs.OpenDirectory(Common::FS::GetSuyuPathString(SuyuPath::DumpDir), rw_mode); if (bis_factory == nullptr) { bis_factory = std::make_unique( diff --git a/src/core/hle/service/jit/jit_code_memory.h b/src/core/hle/service/jit/jit_code_memory.h index 6376d4c4eb..c7e961deb7 100644 --- a/src/core/hle/service/jit/jit_code_memory.h +++ b/src/core/hle/service/jit/jit_code_memory.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -11,7 +11,7 @@ namespace Service::JIT { class CodeMemory { public: - YUZU_NON_COPYABLE(CodeMemory); + SUYU_NON_COPYABLE(CodeMemory); explicit CodeMemory() = default; diff --git a/src/core/hle/service/mii/mii_database_manager.cpp b/src/core/hle/service/mii/mii_database_manager.cpp index 0080b67051..ffaa886f8b 100644 --- a/src/core/hle/service/mii/mii_database_manager.cpp +++ b/src/core/hle/service/mii/mii_database_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/assert.h" @@ -22,9 +22,9 @@ DatabaseManager::DatabaseManager() {} Result DatabaseManager::MountSaveData() { if (!is_save_data_mounted) { system_save_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000030"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000030"; if (is_test_db) { - system_save_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / + system_save_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000031"; } diff --git a/src/core/hle/service/nfc/common/amiibo_crypto.cpp b/src/core/hle/service/nfc/common/amiibo_crypto.cpp index 4274a92c9e..075a61f4a6 100644 --- a/src/core/hle/service/nfc/common/amiibo_crypto.cpp +++ b/src/core/hle/service/nfc/common/amiibo_crypto.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later // SPDX-FileCopyrightText: Copyright 2017 socram8888/amiitool @@ -271,7 +271,7 @@ void Cipher(const DerivedKeys& keys, const NTAG215File& in_data, NTAG215File& ou } bool LoadKeys(InternalKey& locked_secret, InternalKey& unfixed_info) { - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); const Common::FS::IOFile keys_file{yuzu_keys_dir / "key_retail.bin", Common::FS::FileAccessMode::Read, @@ -295,7 +295,7 @@ bool LoadKeys(InternalKey& locked_secret, InternalKey& unfixed_info) { } bool IsKeyAvailable() { - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); return Common::FS::Exists(yuzu_keys_dir / "key_retail.bin"); } diff --git a/src/core/hle/service/nfc/common/device.cpp b/src/core/hle/service/nfc/common/device.cpp index 28e3000bd9..4433f16a82 100644 --- a/src/core/hle/service/nfc/common/device.cpp +++ b/src/core/hle/service/nfc/common/device.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "core/hle/service/glue/time/static.h" @@ -1261,7 +1261,7 @@ Result NfcDevice::BreakTag(NFP::BreakType break_type) { Result NfcDevice::HasBackup(const UniqueSerialNumber& uid, std::size_t uuid_size) const { ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size"); constexpr auto backup_dir = "backup"; - const auto yuzu_amiibo_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::AmiiboDir); + const auto yuzu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir); const auto file_name = fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, "")); @@ -1282,7 +1282,7 @@ Result NfcDevice::ReadBackupData(const UniqueSerialNumber& uid, std::size_t uuid std::span data) const { ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size"); constexpr auto backup_dir = "backup"; - const auto yuzu_amiibo_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::AmiiboDir); + const auto yuzu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir); const auto file_name = fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, "")); @@ -1313,7 +1313,7 @@ Result NfcDevice::WriteBackupData(const UniqueSerialNumber& uid, std::size_t uui std::span data) { ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size"); constexpr auto backup_dir = "backup"; - const auto yuzu_amiibo_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::AmiiboDir); + const auto yuzu_amiibo_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::AmiiboDir); const auto file_name = fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, "")); diff --git a/src/core/hle/service/set/system_settings_server.cpp b/src/core/hle/service/set/system_settings_server.cpp index 82f58fa9f3..21fedde73a 100644 --- a/src/core/hle/service/set/system_settings_server.cpp +++ b/src/core/hle/service/set/system_settings_server.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -1308,25 +1308,25 @@ Result ISystemSettingsServer::SetPanelCrcMode(s32 panel_crc_mode) { void ISystemSettingsServer::SetupSettings() { auto system_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000050"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000050"; if (!LoadSettingsFile(system_dir, []() { return DefaultSystemSettings(); })) { ASSERT(false); } auto private_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000052"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000052"; if (!LoadSettingsFile(private_dir, []() { return DefaultPrivateSettings(); })) { ASSERT(false); } auto device_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000053"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000053"; if (!LoadSettingsFile(device_dir, []() { return DefaultDeviceSettings(); })) { ASSERT(false); } auto appln_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000054"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000054"; if (!LoadSettingsFile(appln_dir, []() { return DefaultApplnSettings(); })) { ASSERT(false); } @@ -1334,25 +1334,25 @@ void ISystemSettingsServer::SetupSettings() { void ISystemSettingsServer::StoreSettings() { auto system_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000050"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000050"; if (!StoreSettingsFile(system_dir, m_system_settings)) { LOG_ERROR(Service_SET, "Failed to store System settings"); } auto private_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000052"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000052"; if (!StoreSettingsFile(private_dir, m_private_settings)) { LOG_ERROR(Service_SET, "Failed to store Private settings"); } auto device_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000053"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000053"; if (!StoreSettingsFile(device_dir, m_device_settings)) { LOG_ERROR(Service_SET, "Failed to store Device settings"); } auto appln_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000054"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000054"; if (!StoreSettingsFile(appln_dir, m_appln_settings)) { LOG_ERROR(Service_SET, "Failed to store ApplLn settings"); } diff --git a/src/core/hle/service/ssl/ssl_backend_securetransport.cpp b/src/core/hle/service/ssl/ssl_backend_securetransport.cpp index c48914f640..dc25304062 100644 --- a/src/core/hle/service/ssl/ssl_backend_securetransport.cpp +++ b/src/core/hle/service/ssl/ssl_backend_securetransport.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -23,7 +23,7 @@ template struct CFReleaser { T ptr; - YUZU_NON_COPYABLE(CFReleaser); + SUYU_NON_COPYABLE(CFReleaser); constexpr CFReleaser() : ptr(nullptr) {} constexpr CFReleaser(T ptr) : ptr(ptr) {} constexpr operator T() { diff --git a/src/core/internal_network/network.cpp b/src/core/internal_network/network.cpp index 7785c1d163..ef2392132f 100644 --- a/src/core/internal_network/network.cpp +++ b/src/core/internal_network/network.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -12,7 +12,7 @@ #ifdef _WIN32 #include #include -#elif YUZU_UNIX +#elif SUYU_UNIX #include #include #include @@ -77,7 +77,7 @@ SOCKET GetInterruptSocket() { sockaddr TranslateFromSockAddrIn(SockAddrIn input) { sockaddr_in result; -#if YUZU_UNIX +#if SUYU_UNIX result.sin_len = sizeof(result); #endif @@ -162,7 +162,7 @@ Errno TranslateNativeError(int e, CallType call_type = CallType::Other) { } } -#elif YUZU_UNIX // ^ _WIN32 v YUZU_UNIX +#elif SUYU_UNIX // ^ _WIN32 v SUYU_UNIX using SOCKET = int; using WSAPOLLFD = pollfd; @@ -835,7 +835,7 @@ std::pair Socket::Send(std::span message, int flags) { ASSERT(flags == 0); int native_flags = 0; -#if YUZU_UNIX +#if SUYU_UNIX native_flags |= MSG_NOSIGNAL; // do not send us SIGPIPE #endif const auto result = send(fd, reinterpret_cast(message.data()), diff --git a/src/core/internal_network/network.h b/src/core/internal_network/network.h index b7b7d773a4..ff636a4812 100644 --- a/src/core/internal_network/network.h +++ b/src/core/internal_network/network.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -13,7 +13,7 @@ #ifdef _WIN32 #include -#elif YUZU_UNIX +#elif SUYU_UNIX #include #endif @@ -104,7 +104,7 @@ constexpr IPv4Address TranslateIPv4(in_addr addr) { auto& bytes = addr.S_un.S_un_b; return IPv4Address{bytes.s_b1, bytes.s_b2, bytes.s_b3, bytes.s_b4}; } -#elif YUZU_UNIX +#elif SUYU_UNIX constexpr IPv4Address TranslateIPv4(in_addr addr) { const u32 bytes = addr.s_addr; return IPv4Address{static_cast(bytes), static_cast(bytes >> 8), diff --git a/src/core/internal_network/socket_proxy.cpp b/src/core/internal_network/socket_proxy.cpp index ce0dee9705..dbeb754e87 100644 --- a/src/core/internal_network/socket_proxy.cpp +++ b/src/core/internal_network/socket_proxy.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -12,7 +12,7 @@ #include "core/internal_network/socket_proxy.h" #include "network/network.h" -#if YUZU_UNIX +#if SUYU_UNIX #include #endif diff --git a/src/core/internal_network/sockets.h b/src/core/internal_network/sockets.h index 3a32dff75d..7f026c6054 100644 --- a/src/core/internal_network/sockets.h +++ b/src/core/internal_network/sockets.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -9,7 +9,7 @@ #include #if defined(_WIN32) -#elif !YUZU_UNIX +#elif !SUYU_UNIX #error "Platform not implemented" #endif @@ -24,7 +24,7 @@ struct ProxyPacket; class SocketBase { public: -#ifdef YUZU_UNIX +#ifdef SUYU_UNIX using SOCKET = int; static constexpr SOCKET INVALID_SOCKET = -1; static constexpr SOCKET SOCKET_ERROR = -1; @@ -39,8 +39,8 @@ public: explicit SocketBase(SOCKET fd_) : fd{fd_} {} virtual ~SocketBase() = default; - YUZU_NON_COPYABLE(SocketBase); - YUZU_NON_MOVEABLE(SocketBase); + SUYU_NON_COPYABLE(SocketBase); + SUYU_NON_MOVEABLE(SocketBase); virtual Errno Initialize(Domain domain, Type type, Protocol protocol) = 0; diff --git a/src/core/loader/loader.h b/src/core/loader/loader.h index f4e932cec9..3460a5bf9d 100644 --- a/src/core/loader/loader.h +++ b/src/core/loader/loader.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -143,8 +143,8 @@ std::ostream& operator<<(std::ostream& os, ResultStatus status); /// Interface for loading an application class AppLoader { public: - YUZU_NON_COPYABLE(AppLoader); - YUZU_NON_MOVEABLE(AppLoader); + SUYU_NON_COPYABLE(AppLoader); + SUYU_NON_MOVEABLE(AppLoader); struct LoadParameters { s32 main_thread_priority; diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp index 1231c0dc87..980efec1d4 100644 --- a/src/core/perf_stats.cpp +++ b/src/core/perf_stats.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2017 Citra Emulator Project +// SPDX-FileCopyrightText: 2017 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -39,7 +39,7 @@ PerfStats::~PerfStats() { std::copy(perf_history.begin() + IgnoreFrames, perf_history.begin() + current_index, std::ostream_iterator(stream, "\n")); - const auto path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::LogDir); + const auto path = Common::FS::GetSuyuPath(Common::FS::SuyuPath::LogDir); // %F Date format expanded is "%Y-%m-%d" const auto filename = fmt::format("{:%F-%H-%M}_{:016X}.csv", *std::localtime(&t), title_id); const auto filepath = path / filename; diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index 1a0138697b..3e98f2538e 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -27,7 +27,7 @@ namespace { std::filesystem::path GetPath(std::string_view type, u64 title_id, std::string_view timestamp) { - return Common::FS::GetYuzuPath(Common::FS::YuzuPath::LogDir) / type / + return Common::FS::GetSuyuPath(Common::FS::SuyuPath::LogDir) / type / fmt::format("{:016X}_{}.json", title_id, timestamp); } @@ -332,7 +332,7 @@ void Reporter::SaveErrorReport(u64 title_id, Result result, void Reporter::SaveFSAccessLog(std::string_view log_message) const { const auto access_log_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "FsAccessLog.txt"; void(Common::FS::AppendStringToFile(access_log_path, Common::FS::FileType::TextFile, log_message)); @@ -352,7 +352,7 @@ void Reporter::SaveUserReport() const { void Reporter::ClearFSAccessLog() const { const auto access_log_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "FsAccessLog.txt"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "FsAccessLog.txt"; Common::FS::IOFile access_log_file{access_log_path, Common::FS::FileAccessMode::Write, Common::FS::FileType::TextFile}; diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index c26179e035..f011c21991 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2017 Citra Emulator Project +// SPDX-FileCopyrightText: 2017 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -114,7 +114,7 @@ static constexpr const char* TranslateASTCDecodeMode(Settings::AstcDecodeMode mo u64 GetTelemetryId() { u64 telemetry_id{}; - const auto filename = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "telemetry_id"; + const auto filename = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir) / "telemetry_id"; bool generate_new_id = !Common::FS::Exists(filename); @@ -156,7 +156,7 @@ u64 GetTelemetryId() { u64 RegenerateTelemetryId() { const u64 new_telemetry_id{GenerateTelemetryId()}; - const auto filename = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "telemetry_id"; + const auto filename = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir) / "telemetry_id"; Common::FS::IOFile file{filename, Common::FS::FileAccessMode::Write, Common::FS::FileType::BinaryFile}; diff --git a/src/dedicated_room/yuzu_room.rc b/src/dedicated_room/yuzu_room.rc index 6e108f6032..214792df92 100644 --- a/src/dedicated_room/yuzu_room.rc +++ b/src/dedicated_room/yuzu_room.rc @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: 2017 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by JuanCStar on 2024/03/06 - #include "winresrc.h" ///////////////////////////////////////////////////////////////////////////// // diff --git a/src/frontend_common/config.cpp b/src/frontend_common/config.cpp index 95f8c8c369..9fe408e5e3 100644 --- a/src/frontend_common/config.cpp +++ b/src/frontend_common/config.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -25,7 +25,7 @@ Config::Config(const ConfigType config_type) : type(config_type), global{config_type == ConfigType::GlobalConfig} {} void Config::Initialize(const std::string& config_name) { - const std::filesystem::path fs_config_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir); + const std::filesystem::path fs_config_loc = FS::GetSuyuPath(FS::SuyuPath::ConfigDir); const auto config_file = fmt::format("{}.ini", config_name); switch (type) { @@ -51,7 +51,7 @@ void Config::Initialize(const std::string& config_name) { void Config::Initialize(const std::optional config_path) { const std::filesystem::path default_sdl_config_path = - FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "sdl2-config.ini"; + FS::GetSuyuPath(FS::SuyuPath::ConfigDir) / "sdl2-config.ini"; config_loc = config_path.value_or(FS::PathToUTF8String(default_sdl_config_path)); void(FS::CreateParentDir(config_loc)); SetUpIni(); @@ -275,11 +275,11 @@ void Config::ReadCoreValues() { void Config::ReadDataStorageValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::DataStorage)); - FS::SetYuzuPath(FS::YuzuPath::NANDDir, ReadStringSetting(std::string("nand_directory"))); - FS::SetYuzuPath(FS::YuzuPath::SDMCDir, ReadStringSetting(std::string("sdmc_directory"))); - FS::SetYuzuPath(FS::YuzuPath::LoadDir, ReadStringSetting(std::string("load_directory"))); - FS::SetYuzuPath(FS::YuzuPath::DumpDir, ReadStringSetting(std::string("dump_directory"))); - FS::SetYuzuPath(FS::YuzuPath::TASDir, ReadStringSetting(std::string("tas_directory"))); + FS::SetSuyuPath(FS::SuyuPath::NANDDir, ReadStringSetting(std::string("nand_directory"))); + FS::SetSuyuPath(FS::SuyuPath::SDMCDir, ReadStringSetting(std::string("sdmc_directory"))); + FS::SetSuyuPath(FS::SuyuPath::LoadDir, ReadStringSetting(std::string("load_directory"))); + FS::SetSuyuPath(FS::SuyuPath::DumpDir, ReadStringSetting(std::string("dump_directory"))); + FS::SetSuyuPath(FS::SuyuPath::TASDir, ReadStringSetting(std::string("tas_directory"))); ReadCategory(Settings::Category::DataStorage); @@ -371,7 +371,7 @@ void Config::ReadScreenshotValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::Screenshots)); ReadCategory(Settings::Category::Screenshots); - FS::SetYuzuPath(FS::YuzuPath::ScreenshotsDir, + FS::SetSuyuPath(FS::SuyuPath::ScreenshotsDir, ReadStringSetting(std::string("screenshot_path"))); EndGroup(); @@ -577,16 +577,16 @@ void Config::SaveCoreValues() { void Config::SaveDataStorageValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::DataStorage)); - WriteStringSetting(std::string("nand_directory"), FS::GetYuzuPathString(FS::YuzuPath::NANDDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::NANDDir))); - WriteStringSetting(std::string("sdmc_directory"), FS::GetYuzuPathString(FS::YuzuPath::SDMCDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::SDMCDir))); - WriteStringSetting(std::string("load_directory"), FS::GetYuzuPathString(FS::YuzuPath::LoadDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::LoadDir))); - WriteStringSetting(std::string("dump_directory"), FS::GetYuzuPathString(FS::YuzuPath::DumpDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::DumpDir))); - WriteStringSetting(std::string("tas_directory"), FS::GetYuzuPathString(FS::YuzuPath::TASDir), - std::make_optional(FS::GetYuzuPathString(FS::YuzuPath::TASDir))); + WriteStringSetting(std::string("nand_directory"), FS::GetSuyuPathString(FS::SuyuPath::NANDDir), + std::make_optional(FS::GetSuyuPathString(FS::SuyuPath::NANDDir))); + WriteStringSetting(std::string("sdmc_directory"), FS::GetSuyuPathString(FS::SuyuPath::SDMCDir), + std::make_optional(FS::GetSuyuPathString(FS::SuyuPath::SDMCDir))); + WriteStringSetting(std::string("load_directory"), FS::GetSuyuPathString(FS::SuyuPath::LoadDir), + std::make_optional(FS::GetSuyuPathString(FS::SuyuPath::LoadDir))); + WriteStringSetting(std::string("dump_directory"), FS::GetSuyuPathString(FS::SuyuPath::DumpDir), + std::make_optional(FS::GetSuyuPathString(FS::SuyuPath::DumpDir))); + WriteStringSetting(std::string("tas_directory"), FS::GetSuyuPathString(FS::SuyuPath::TASDir), + std::make_optional(FS::GetSuyuPathString(FS::SuyuPath::TASDir))); WriteCategory(Settings::Category::DataStorage); @@ -679,7 +679,7 @@ void Config::SaveScreenshotValues() { BeginGroup(Settings::TranslateCategory(Settings::Category::Screenshots)); WriteStringSetting(std::string("screenshot_path"), - FS::GetYuzuPathString(FS::YuzuPath::ScreenshotsDir)); + FS::GetSuyuPathString(FS::SuyuPath::ScreenshotsDir)); WriteCategory(Settings::Category::Screenshots); EndGroup(); diff --git a/src/hid_core/frontend/emulated_console.h b/src/hid_core/frontend/emulated_console.h index 847551395c..5ea2093949 100644 --- a/src/hid_core/frontend/emulated_console.h +++ b/src/hid_core/frontend/emulated_console.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -80,8 +80,8 @@ public: explicit EmulatedConsole(); ~EmulatedConsole(); - YUZU_NON_COPYABLE(EmulatedConsole); - YUZU_NON_MOVEABLE(EmulatedConsole); + SUYU_NON_COPYABLE(EmulatedConsole); + SUYU_NON_MOVEABLE(EmulatedConsole); /// Removes all callbacks created from input devices void UnloadInput(); diff --git a/src/hid_core/frontend/emulated_controller.h b/src/hid_core/frontend/emulated_controller.h index 17ad6069e0..fbe83dd48e 100644 --- a/src/hid_core/frontend/emulated_controller.h +++ b/src/hid_core/frontend/emulated_controller.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -178,8 +178,8 @@ public: explicit EmulatedController(NpadIdType npad_id_type_); ~EmulatedController(); - YUZU_NON_COPYABLE(EmulatedController); - YUZU_NON_MOVEABLE(EmulatedController); + SUYU_NON_COPYABLE(EmulatedController); + SUYU_NON_MOVEABLE(EmulatedController); /// Converts the controller type from settings to npad type static NpadStyleIndex MapSettingsTypeToNPad(Settings::ControllerType type); diff --git a/src/hid_core/frontend/emulated_devices.h b/src/hid_core/frontend/emulated_devices.h index b2e57318cc..8ec58c1603 100644 --- a/src/hid_core/frontend/emulated_devices.h +++ b/src/hid_core/frontend/emulated_devices.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -81,8 +81,8 @@ public: explicit EmulatedDevices(); ~EmulatedDevices(); - YUZU_NON_COPYABLE(EmulatedDevices); - YUZU_NON_MOVEABLE(EmulatedDevices); + SUYU_NON_COPYABLE(EmulatedDevices); + SUYU_NON_MOVEABLE(EmulatedDevices); /// Removes all callbacks created from input devices void UnloadInput(); diff --git a/src/hid_core/hid_core.h b/src/hid_core/hid_core.h index dae29c5062..aa9ff5d7a0 100644 --- a/src/hid_core/hid_core.h +++ b/src/hid_core/hid_core.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -21,8 +21,8 @@ public: explicit HIDCore(); ~HIDCore(); - YUZU_NON_COPYABLE(HIDCore); - YUZU_NON_MOVEABLE(HIDCore); + SUYU_NON_COPYABLE(HIDCore); + SUYU_NON_MOVEABLE(HIDCore); EmulatedController* GetEmulatedController(NpadIdType npad_id_type); const EmulatedController* GetEmulatedController(NpadIdType npad_id_type) const; diff --git a/src/input_common/drivers/tas_input.cpp b/src/input_common/drivers/tas_input.cpp index f3cb14c56f..93e17de27a 100644 --- a/src/input_common/drivers/tas_input.cpp +++ b/src/input_common/drivers/tas_input.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -82,7 +82,7 @@ void Tas::LoadTasFile(size_t player_index, size_t file_index) { commands[player_index].clear(); std::string file = Common::FS::ReadStringFromFile( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::TASDir) / + Common::FS::GetSuyuPath(Common::FS::SuyuPath::TASDir) / fmt::format("script{}-{}.txt", file_index, player_index + 1), Common::FS::FileType::BinaryFile); std::istringstream command_line(file); @@ -137,7 +137,7 @@ void Tas::WriteTasFile(std::u8string_view file_name) { WriteCommandAxis(line.l_axis), WriteCommandAxis(line.r_axis)); } - const auto tas_file_name = Common::FS::GetYuzuPath(Common::FS::YuzuPath::TASDir) / file_name; + const auto tas_file_name = Common::FS::GetSuyuPath(Common::FS::SuyuPath::TASDir) / file_name; const auto bytes_written = Common::FS::WriteStringToFile(tas_file_name, Common::FS::FileType::TextFile, output_text); if (bytes_written == output_text.size()) { diff --git a/src/video_core/host1x/ffmpeg/ffmpeg.h b/src/video_core/host1x/ffmpeg/ffmpeg.h index 1de0bbd839..00ba8f0906 100644 --- a/src/video_core/host1x/ffmpeg/ffmpeg.h +++ b/src/video_core/host1x/ffmpeg/ffmpeg.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -43,8 +43,8 @@ class DeinterlaceFilter; // Wraps an AVPacket, a container for compressed bitstream data. class Packet { public: - YUZU_NON_COPYABLE(Packet); - YUZU_NON_MOVEABLE(Packet); + SUYU_NON_COPYABLE(Packet); + SUYU_NON_MOVEABLE(Packet); explicit Packet(std::span data); ~Packet(); @@ -60,8 +60,8 @@ private: // Wraps an AVFrame, a container for audio and video stream data. class Frame { public: - YUZU_NON_COPYABLE(Frame); - YUZU_NON_MOVEABLE(Frame); + SUYU_NON_COPYABLE(Frame); + SUYU_NON_MOVEABLE(Frame); explicit Frame(); ~Frame(); @@ -109,8 +109,8 @@ private: // Wraps an AVCodec, a type containing information about a codec. class Decoder { public: - YUZU_NON_COPYABLE(Decoder); - YUZU_NON_MOVEABLE(Decoder); + SUYU_NON_COPYABLE(Decoder); + SUYU_NON_MOVEABLE(Decoder); explicit Decoder(Tegra::Host1x::NvdecCommon::VideoCodec codec); ~Decoder() = default; @@ -128,8 +128,8 @@ private: // Wraps AVBufferRef for an accelerated decoder. class HardwareContext { public: - YUZU_NON_COPYABLE(HardwareContext); - YUZU_NON_MOVEABLE(HardwareContext); + SUYU_NON_COPYABLE(HardwareContext); + SUYU_NON_MOVEABLE(HardwareContext); static std::vector GetSupportedDeviceTypes(); @@ -151,8 +151,8 @@ private: // Wraps an AVCodecContext. class DecoderContext { public: - YUZU_NON_COPYABLE(DecoderContext); - YUZU_NON_MOVEABLE(DecoderContext); + SUYU_NON_COPYABLE(DecoderContext); + SUYU_NON_MOVEABLE(DecoderContext); explicit DecoderContext(const Decoder& decoder); ~DecoderContext(); @@ -173,8 +173,8 @@ private: // Wraps an AVFilterGraph. class DeinterlaceFilter { public: - YUZU_NON_COPYABLE(DeinterlaceFilter); - YUZU_NON_MOVEABLE(DeinterlaceFilter); + SUYU_NON_COPYABLE(DeinterlaceFilter); + SUYU_NON_MOVEABLE(DeinterlaceFilter); explicit DeinterlaceFilter(const Frame& frame); ~DeinterlaceFilter(); @@ -191,8 +191,8 @@ private: class DecodeApi { public: - YUZU_NON_COPYABLE(DecodeApi); - YUZU_NON_MOVEABLE(DecodeApi); + SUYU_NON_COPYABLE(DecodeApi); + SUYU_NON_MOVEABLE(DecodeApi); DecodeApi() = default; ~DecodeApi() = default; diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp index 5d0bb9cc45..77cecbe779 100644 --- a/src/video_core/macro/macro.cpp +++ b/src/video_core/macro/macro.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -28,7 +28,7 @@ MICROPROFILE_DEFINE(MacroHLE, "GPU", "Execute macro HLE", MP_RGB(128, 192, 192)) namespace Tegra { static void Dump(u64 hash, std::span code, bool decompiled = false) { - const auto base_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)}; + const auto base_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::DumpDir)}; const auto macro_dir{base_dir / "macros"}; if (!Common::FS::CreateDir(base_dir) || !Common::FS::CreateDir(macro_dir)) { LOG_ERROR(Common_Filesystem, "Failed to create macro dump directories"); diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 67427f9372..c180bef73e 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -30,8 +30,8 @@ struct RendererSettings { class RendererBase { public: - YUZU_NON_COPYABLE(RendererBase); - YUZU_NON_MOVEABLE(RendererBase); + SUYU_NON_COPYABLE(RendererBase); + SUYU_NON_MOVEABLE(RendererBase); explicit RendererBase(Core::Frontend::EmuWindow& window, std::unique_ptr context); diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 9be1b08055..92eff494a6 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -108,14 +108,14 @@ bool IsASTCSupported() { static bool HasSlowSoftwareAstc(std::string_view vendor_name, std::string_view renderer) { // ifdef for Unix reduces string comparisons for non-Windows drivers, and Intel -#ifdef YUZU_UNIX +#ifdef SUYU_UNIX // Sorted vaguely by how likely a vendor is to appear if (vendor_name == "AMD") { // RadeonSI return true; } if (vendor_name == "Intel") { - // Must be inside YUZU_UNIX ifdef as the Windows driver uses the same vendor string + // Must be inside SUYU_UNIX ifdef as the Windows driver uses the same vendor string // iris, crocus const bool is_intel_dg = (renderer.find("DG") != std::string_view::npos); return is_intel_dg; diff --git a/src/video_core/renderer_opengl/gl_resource_manager.h b/src/video_core/renderer_opengl/gl_resource_manager.h index 6ca8227bdb..b8831ac00a 100644 --- a/src/video_core/renderer_opengl/gl_resource_manager.h +++ b/src/video_core/renderer_opengl/gl_resource_manager.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2015 Citra Emulator Project +// SPDX-FileCopyrightText: 2015 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -12,7 +12,7 @@ namespace OpenGL { class OGLRenderbuffer final { public: - YUZU_NON_COPYABLE(OGLRenderbuffer); + SUYU_NON_COPYABLE(OGLRenderbuffer); OGLRenderbuffer() = default; @@ -39,7 +39,7 @@ public: class OGLTexture final { public: - YUZU_NON_COPYABLE(OGLTexture); + SUYU_NON_COPYABLE(OGLTexture); OGLTexture() = default; @@ -66,7 +66,7 @@ public: class OGLTextureView final { public: - YUZU_NON_COPYABLE(OGLTextureView); + SUYU_NON_COPYABLE(OGLTextureView); OGLTextureView() = default; @@ -93,7 +93,7 @@ public: class OGLSampler final { public: - YUZU_NON_COPYABLE(OGLSampler); + SUYU_NON_COPYABLE(OGLSampler); OGLSampler() = default; @@ -120,7 +120,7 @@ public: class OGLShader final { public: - YUZU_NON_COPYABLE(OGLShader); + SUYU_NON_COPYABLE(OGLShader); OGLShader() = default; @@ -143,7 +143,7 @@ public: class OGLProgram final { public: - YUZU_NON_COPYABLE(OGLProgram); + SUYU_NON_COPYABLE(OGLProgram); OGLProgram() = default; @@ -167,7 +167,7 @@ public: class OGLAssemblyProgram final { public: - YUZU_NON_COPYABLE(OGLAssemblyProgram); + SUYU_NON_COPYABLE(OGLAssemblyProgram); OGLAssemblyProgram() = default; @@ -191,7 +191,7 @@ public: class OGLPipeline final { public: - YUZU_NON_COPYABLE(OGLPipeline); + SUYU_NON_COPYABLE(OGLPipeline); OGLPipeline() = default; OGLPipeline(OGLPipeline&& o) noexcept : handle{std::exchange(o.handle, 0)} {} @@ -215,7 +215,7 @@ public: class OGLBuffer final { public: - YUZU_NON_COPYABLE(OGLBuffer); + SUYU_NON_COPYABLE(OGLBuffer); OGLBuffer() = default; @@ -242,7 +242,7 @@ public: class OGLSync final { public: - YUZU_NON_COPYABLE(OGLSync); + SUYU_NON_COPYABLE(OGLSync); OGLSync() = default; @@ -271,7 +271,7 @@ public: class OGLFramebuffer final { public: - YUZU_NON_COPYABLE(OGLFramebuffer); + SUYU_NON_COPYABLE(OGLFramebuffer); OGLFramebuffer() = default; @@ -298,7 +298,7 @@ public: class OGLQuery final { public: - YUZU_NON_COPYABLE(OGLQuery); + SUYU_NON_COPYABLE(OGLQuery); OGLQuery() = default; @@ -325,7 +325,7 @@ public: class OGLTransformFeedback final { public: - YUZU_NON_COPYABLE(OGLTransformFeedback); + SUYU_NON_COPYABLE(OGLTransformFeedback); OGLTransformFeedback() = default; diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp index c4bad6fca5..dd48983ea2 100644 --- a/src/video_core/renderer_opengl/gl_shader_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -260,7 +260,7 @@ void ShaderCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading, if (title_id == 0) { return; } - const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)}; + const auto shader_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir)}; const auto base_dir{shader_dir / fmt::format("{:016x}", title_id)}; if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) { LOG_ERROR(Common_Filesystem, "Failed to create shader cache directories"); diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index d34b585d67..1cda51946e 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -464,7 +464,7 @@ void PipelineCache::LoadDiskResources(u64 title_id, std::stop_token stop_loading if (title_id == 0) { return; } - const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir)}; + const auto shader_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir)}; const auto base_dir{shader_dir / fmt::format("{:016x}", title_id)}; if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) { LOG_ERROR(Common_Filesystem, "Failed to create pipeline cache directories"); diff --git a/src/video_core/shader_environment.cpp b/src/video_core/shader_environment.cpp index 250fde96cc..282bb04ae5 100644 --- a/src/video_core/shader_environment.cpp +++ b/src/video_core/shader_environment.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -91,7 +91,7 @@ static std::string_view StageToPrefix(Shader::Stage stage) { static void DumpImpl(u64 pipeline_hash, u64 shader_hash, std::span code, [[maybe_unused]] u32 read_highest, [[maybe_unused]] u32 read_lowest, u32 initial_offset, Shader::Stage stage) { - const auto shader_dir{Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir)}; + const auto shader_dir{Common::FS::GetSuyuPath(Common::FS::SuyuPath::DumpDir)}; const auto base_dir{shader_dir / "shaders"}; if (!Common::FS::CreateDir(shader_dir) || !Common::FS::CreateDir(base_dir)) { LOG_ERROR(Common_Filesystem, "Failed to create shader dump directories"); diff --git a/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp b/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp index f41c3e5067..862d8e2a54 100644 --- a/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp +++ b/src/video_core/vulkan_common/nsight_aftermath_tracker.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #ifdef HAS_NSIGHT_AFTERMATH @@ -47,7 +47,7 @@ NsightAftermathTracker::NsightAftermathTracker() { LOG_ERROR(Render_Vulkan, "Failed to load Nsight Aftermath function pointers"); return; } - dump_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::LogDir) / "gpucrash"; + dump_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::LogDir) / "gpucrash"; Common::FS::RemoveDirRecursively(dump_dir); if (!Common::FS::CreateDir(dump_dir)) { diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index 0b48045f36..99ebaf26e0 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt @@ -1,8 +1,6 @@ # SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 Suyu Emulator Project # SPDX-License-Identifier: GPL-2.0-or-later -# Modified by JuanCStar on 2024/03/06 - set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOUIC ON) @@ -351,7 +349,7 @@ target_sources(yuzu ) if (APPLE) - set(MACOSX_ICON "../../dist/yuzu.icns") + set(MACOSX_ICON "../../dist/suyu.icns") set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) target_sources(yuzu PRIVATE ${MACOSX_ICON}) set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE TRUE) @@ -431,9 +429,9 @@ if (ENABLE_WEB_SERVICE) target_compile_definitions(yuzu PRIVATE -DENABLE_WEB_SERVICE) endif() -if (YUZU_USE_QT_MULTIMEDIA) +if (SUYU_USE_QT_MULTIMEDIA) target_link_libraries(yuzu PRIVATE Qt${QT_MAJOR_VERSION}::Multimedia) - target_compile_definitions(yuzu PRIVATE -DYUZU_USE_QT_MULTIMEDIA) + target_compile_definitions(yuzu PRIVATE -DSUYU_USE_QT_MULTIMEDIA) endif () if (YUZU_USE_QT_WEB_ENGINE) diff --git a/src/yuzu/Info.plist b/src/yuzu/Info.plist index f05f3186c7..0cd5643acc 100644 --- a/src/yuzu/Info.plist +++ b/src/yuzu/Info.plist @@ -15,7 +15,7 @@ SPDX-License-Identifier: GPL-2.0-or-later CFBundleGetInfoString CFBundleIconFile - yuzu.icns + suyu.icns CFBundleIdentifier com.yuzu-emu.yuzu CFBundleInfoDictionaryVersion diff --git a/src/yuzu/about_dialog.cpp b/src/yuzu/about_dialog.cpp index a7df9c3174..83d5a77ea0 100644 --- a/src/yuzu/about_dialog.cpp +++ b/src/yuzu/about_dialog.cpp @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by JuanCStar on 2024/03/06 - #include #include #include "common/scm_rev.h" diff --git a/src/yuzu/about_dialog.h b/src/yuzu/about_dialog.h index e360ab4f44..ac64247507 100644 --- a/src/yuzu/about_dialog.h +++ b/src/yuzu/about_dialog.h @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by JuanCStar on 2024/03/06 - #pragma once #include diff --git a/src/yuzu/aboutdialog.ui b/src/yuzu/aboutdialog.ui index bd4082c1d1..3b2ca649d9 100644 --- a/src/yuzu/aboutdialog.ui +++ b/src/yuzu/aboutdialog.ui @@ -182,4 +182,4 @@ p, li { white-space: pre-wrap; } reject() -
+ \ No newline at end of file diff --git a/src/yuzu/applets/qt_profile_select.cpp b/src/yuzu/applets/qt_profile_select.cpp index 66edd6acde..9ef8b30823 100644 --- a/src/yuzu/applets/qt_profile_select.cpp +++ b/src/yuzu/applets/qt_profile_select.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -30,7 +30,7 @@ QString FormatUserEntryText(const QString& username, Common::UUID uuid) { QString GetImagePath(Common::UUID uuid) { const auto path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString()); return QString::fromStdString(Common::FS::PathToUTF8String(path)); } diff --git a/src/yuzu/applets/qt_web_browser.cpp b/src/yuzu/applets/qt_web_browser.cpp index cce9b2efb2..a7802c612a 100644 --- a/src/yuzu/applets/qt_web_browser.cpp +++ b/src/yuzu/applets/qt_web_browser.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #ifdef YUZU_USE_QT_WEB_ENGINE @@ -57,7 +57,7 @@ QtNXWebEngineView::QtNXWebEngineView(QWidget* parent, Core::System& system, default_profile{QWebEngineProfile::defaultProfile()}, global_settings{ default_profile->settings()} { default_profile->setPersistentStoragePath(QString::fromStdString(Common::FS::PathToUTF8String( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::YuzuDir) / "qtwebengine"))); + Common::FS::GetSuyuPath(Common::FS::SuyuPath::SuyuDir) / "qtwebengine"))); QWebEngineScript gamepad; QWebEngineScript window_nx; @@ -336,7 +336,7 @@ void QtNXWebEngineView::LoadExtractedFonts() { QWebEngineScript load_nx_font; auto fonts_dir_str = Common::FS::PathToUTF8String( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / "fonts/"); + Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "fonts/"); std::replace(fonts_dir_str.begin(), fonts_dir_str.end(), '\\', '/'); diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index ed57501552..d089a3cfc0 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -13,7 +13,7 @@ #include #include "common/settings_enums.h" #include "uisettings.h" -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA #include #include #include @@ -286,7 +286,7 @@ GRenderWindow::GRenderWindow(GMainWindow* parent, EmuThread* emu_thread_, Core::System& system_) : QWidget(parent), emu_thread(emu_thread_), input_subsystem{std::move(input_subsystem_)}, system{system_} { - setWindowTitle(QStringLiteral("yuzu %1 | %2-%3") + setWindowTitle(QStringLiteral("suyu %1 | %2-%3") .arg(QString::fromUtf8(Common::g_build_name), QString::fromUtf8(Common::g_scm_branch), QString::fromUtf8(Common::g_scm_desc))); @@ -760,7 +760,7 @@ void GRenderWindow::TouchEndEvent() { } void GRenderWindow::InitializeCamera() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA constexpr auto camera_update_ms = std::chrono::milliseconds{50}; // (50ms, 20Hz) if (!Settings::values.enable_ir_sensor) { return; @@ -821,7 +821,7 @@ void GRenderWindow::InitializeCamera() { } void GRenderWindow::FinalizeCamera() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA if (camera_timer) { camera_timer->stop(); } @@ -832,7 +832,7 @@ void GRenderWindow::FinalizeCamera() { } void GRenderWindow::RequestCameraCapture() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA if (!Settings::values.enable_ir_sensor) { return; } @@ -853,7 +853,7 @@ void GRenderWindow::RequestCameraCapture() { } void GRenderWindow::OnCameraCapture(int requestId, const QImage& img) { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA // TODO: Capture directly in the format and resolution needed const auto camera_width = input_subsystem->GetCamera()->getImageWidth(); const auto camera_height = input_subsystem->GetCamera()->getImageHeight(); @@ -1034,7 +1034,7 @@ bool GRenderWindow::InitializeOpenGL() { return true; #else QMessageBox::warning(this, tr("OpenGL not available!"), - tr("yuzu has not been compiled with OpenGL support.")); + tr("yusu has not been compiled with OpenGL support.")); return false; #endif } diff --git a/src/yuzu/bootmanager.h b/src/yuzu/bootmanager.h index ae12b34818..df09cae04e 100644 --- a/src/yuzu/bootmanager.h +++ b/src/yuzu/bootmanager.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -261,7 +261,7 @@ private: bool first_frame = false; InputCommon::TasInput::TasState last_tas_state; -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA bool is_virtual_camera; int pending_camera_snapshots; std::vector camera_data; diff --git a/src/yuzu/breakpad.cpp b/src/yuzu/breakpad.cpp index 0f6a71ab08..0c27de117f 100644 --- a/src/yuzu/breakpad.cpp +++ b/src/yuzu/breakpad.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -50,8 +50,8 @@ static void PruneDumpDirectory(const std::filesystem::path& dump_path) { } #if defined(__linux__) -[[noreturn]] bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, - bool succeeded) { +[[noreturn]] static bool DumpCallback(const google_breakpad::MinidumpDescriptor& descriptor, void* context, + bool succeeded) { // Prevent time- and space-consuming core dumps from being generated, as we have // already generated a minidump and a core file will not be useful anyway. _exit(1); @@ -60,7 +60,7 @@ static void PruneDumpDirectory(const std::filesystem::path& dump_path) { void InstallCrashHandler() { // Write crash dumps to profile directory. - const auto dump_path = GetYuzuPath(Common::FS::YuzuPath::CrashDumpsDir); + const auto dump_path = GetSuyuPath(Common::FS::SuyuPath::CrashDumpsDir); PruneDumpDirectory(dump_path); #if defined(_WIN32) diff --git a/src/yuzu/compatdb.ui b/src/yuzu/compatdb.ui index d11669df26..92ef5c68ce 100644 --- a/src/yuzu/compatdb.ui +++ b/src/yuzu/compatdb.ui @@ -33,7 +33,7 @@ - <html><head/><body><p><span style=" font-size:10pt;">Should you choose to submit a test case to the </span><a href="https://yuzu-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">yuzu 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 yuzu 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 yuzu account</li></ul></body></html> + <html><head/><body><p><span style=" font-size:10pt;">Should you choose to submit a test case to the </span><a href="https://suyu-emu.org/game/"><span style=" font-size:10pt; text-decoration: underline; color:#0000ff;">suyu 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 suyu 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 suyu account</li></ul></body></html> true diff --git a/src/yuzu/configuration/configure_camera.cpp b/src/yuzu/configuration/configure_camera.cpp index 3368f53f30..bdc080e524 100644 --- a/src/yuzu/configuration/configure_camera.cpp +++ b/src/yuzu/configuration/configure_camera.cpp @@ -1,9 +1,9 @@ -// Text : Copyright 2022 yuzu Emulator Project +// Text : Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #include #include -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA #include #include #endif @@ -36,7 +36,7 @@ ConfigureCamera::ConfigureCamera(QWidget* parent, InputCommon::InputSubsystem* i ConfigureCamera::~ConfigureCamera() = default; void ConfigureCamera::PreviewCamera() { -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA const auto index = ui->ir_sensor_combo_box->currentIndex(); bool camera_found = false; const QList cameras = QCameraInfo::availableCameras(); @@ -138,7 +138,7 @@ void ConfigureCamera::LoadConfiguration() { ui->ir_sensor_combo_box->clear(); input_devices.push_back("Auto"); ui->ir_sensor_combo_box->addItem(tr("Auto")); -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA const auto cameras = QCameraInfo::availableCameras(); for (const QCameraInfo& cameraInfo : cameras) { input_devices.push_back(cameraInfo.deviceName().toStdString()); diff --git a/src/yuzu/configuration/configure_camera.h b/src/yuzu/configuration/configure_camera.h index 3d822da7bb..1df3738acb 100644 --- a/src/yuzu/configuration/configure_camera.h +++ b/src/yuzu/configuration/configure_camera.h @@ -1,4 +1,4 @@ -// Text : Copyright 2022 yuzu Emulator Project +// Text : Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-3.0-or-later #pragma once @@ -46,7 +46,7 @@ private: bool is_virtual_camera; int pending_snapshots; -#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && YUZU_USE_QT_MULTIMEDIA +#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && SUYU_USE_QT_MULTIMEDIA std::unique_ptr camera; std::unique_ptr camera_capture; #endif diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 1010038b76..85f82a7507 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -21,7 +21,7 @@ ConfigureDebug::ConfigureDebug(const Core::System& system_, QWidget* parent) connect(ui->open_log_button, &QPushButton::clicked, []() { const auto path = - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::LogDir)); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::LogDir)); QDesktopServices::openUrl(QUrl::fromLocalFile(path)); }); diff --git a/src/yuzu/configuration/configure_filesystem.cpp b/src/yuzu/configuration/configure_filesystem.cpp index ad19517546..938df54d9a 100644 --- a/src/yuzu/configuration/configure_filesystem.cpp +++ b/src/yuzu/configuration/configure_filesystem.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -47,15 +47,15 @@ void ConfigureFilesystem::changeEvent(QEvent* event) { void ConfigureFilesystem::SetConfiguration() { ui->nand_directory_edit->setText( - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::NANDDir))); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::NANDDir))); ui->sdmc_directory_edit->setText( - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::SDMCDir))); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::SDMCDir))); ui->gamecard_path_edit->setText( QString::fromStdString(Settings::values.gamecard_path.GetValue())); ui->dump_path_edit->setText( - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::DumpDir))); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::DumpDir))); ui->load_path_edit->setText( - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::LoadDir))); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::LoadDir))); ui->gamecard_inserted->setChecked(Settings::values.gamecard_inserted.GetValue()); ui->gamecard_current_game->setChecked(Settings::values.gamecard_current_game.GetValue()); @@ -68,13 +68,13 @@ void ConfigureFilesystem::SetConfiguration() { } void ConfigureFilesystem::ApplyConfiguration() { - Common::FS::SetYuzuPath(Common::FS::YuzuPath::NANDDir, + Common::FS::SetSuyuPath(Common::FS::SuyuPath::NANDDir, ui->nand_directory_edit->text().toStdString()); - Common::FS::SetYuzuPath(Common::FS::YuzuPath::SDMCDir, + Common::FS::SetSuyuPath(Common::FS::SuyuPath::SDMCDir, ui->sdmc_directory_edit->text().toStdString()); - Common::FS::SetYuzuPath(Common::FS::YuzuPath::DumpDir, + Common::FS::SetSuyuPath(Common::FS::SuyuPath::DumpDir, ui->dump_path_edit->text().toStdString()); - Common::FS::SetYuzuPath(Common::FS::YuzuPath::LoadDir, + Common::FS::SetSuyuPath(Common::FS::SuyuPath::LoadDir, ui->load_path_edit->text().toStdString()); Settings::values.gamecard_inserted = ui->gamecard_inserted->isChecked(); @@ -126,12 +126,12 @@ void ConfigureFilesystem::SetDirectory(DirectoryTarget target, QLineEdit* edit) } void ConfigureFilesystem::ResetMetadata() { - if (!Common::FS::Exists(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / + if (!Common::FS::Exists(Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list/")) { QMessageBox::information(this, tr("Reset Metadata Cache"), tr("The metadata cache is already empty.")); } else if (Common::FS::RemoveDirRecursively( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / "game_list")) { + Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list")) { QMessageBox::information(this, tr("Reset Metadata Cache"), tr("The operation completed successfully.")); UISettings::values.is_game_list_reload_pending.exchange(true); diff --git a/src/yuzu/configuration/configure_input_advanced.cpp b/src/yuzu/configuration/configure_input_advanced.cpp index d6c4e09ec0..22589e8e0b 100644 --- a/src/yuzu/configuration/configure_input_advanced.cpp +++ b/src/yuzu/configuration/configure_input_advanced.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -197,7 +197,7 @@ void ConfigureInputAdvanced::UpdateUIEnabled() { ui->debug_configure->setEnabled(ui->debug_enabled->isChecked()); ui->touchscreen_advanced->setEnabled(ui->touchscreen_enabled->isChecked()); ui->ring_controller_configure->setEnabled(ui->enable_ring_controller->isChecked()); -#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) || !defined(YUZU_USE_QT_MULTIMEDIA) +#if QT_VERSION > QT_VERSION_CHECK(6, 0, 0) || !defined(SUYU_USE_QT_MULTIMEDIA) ui->enable_ir_sensor->setEnabled(false); ui->camera_configure->setEnabled(false); #endif diff --git a/src/yuzu/configuration/configure_per_game_addons.cpp b/src/yuzu/configuration/configure_per_game_addons.cpp index 568775027b..1a49aeda5a 100644 --- a/src/yuzu/configuration/configure_per_game_addons.cpp +++ b/src/yuzu/configuration/configure_per_game_addons.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -80,7 +80,7 @@ void ConfigurePerGameAddons::ApplyConfiguration() { std::sort(disabled_addons.begin(), disabled_addons.end()); std::sort(current.begin(), current.end()); if (disabled_addons != current) { - Common::FS::RemoveFile(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / + Common::FS::RemoveFile(Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list" / fmt::format("{:016X}.pv.txt", title_id)); } diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp index 12a04b9a0b..3bf2211b6b 100644 --- a/src/yuzu/configuration/configure_profile_manager.cpp +++ b/src/yuzu/configuration/configure_profile_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -35,7 +35,7 @@ constexpr std::array backup_jpeg{ QString GetImagePath(const Common::UUID& uuid) { const auto path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString()); return QString::fromStdString(Common::FS::PathToUTF8String(path)); } @@ -288,7 +288,7 @@ void ConfigureProfileManager::SetUserImage() { } const auto raw_path = QString::fromStdString(Common::FS::PathToUTF8String( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000010")); + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/save/8000000000000010")); const QFileInfo raw_info{raw_path}; if (raw_info.exists() && !raw_info.isDir() && !QFile::remove(raw_path)) { QMessageBox::warning(this, tr("Error deleting file"), diff --git a/src/yuzu/configuration/configure_tas.cpp b/src/yuzu/configuration/configure_tas.cpp index 5a545aa706..1c9b487b8b 100644 --- a/src/yuzu/configuration/configure_tas.cpp +++ b/src/yuzu/configuration/configure_tas.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -28,14 +28,14 @@ ConfigureTasDialog::~ConfigureTasDialog() = default; void ConfigureTasDialog::LoadConfiguration() { ui->tas_path_edit->setText( - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::TASDir))); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::TASDir))); ui->tas_enable->setChecked(Settings::values.tas_enable.GetValue()); ui->tas_loop_script->setChecked(Settings::values.tas_loop.GetValue()); ui->tas_pause_on_load->setChecked(Settings::values.pause_tas_on_load.GetValue()); } void ConfigureTasDialog::ApplyConfiguration() { - Common::FS::SetYuzuPath(Common::FS::YuzuPath::TASDir, ui->tas_path_edit->text().toStdString()); + Common::FS::SetSuyuPath(Common::FS::SuyuPath::TASDir, ui->tas_path_edit->text().toStdString()); Settings::values.tas_enable.SetValue(ui->tas_enable->isChecked()); Settings::values.tas_loop.SetValue(ui->tas_loop_script->isChecked()); Settings::values.pause_tas_on_load.SetValue(ui->tas_pause_on_load->isChecked()); diff --git a/src/yuzu/configuration/configure_ui.cpp b/src/yuzu/configuration/configure_ui.cpp index f3c91586c4..1318049402 100644 --- a/src/yuzu/configuration/configure_ui.cpp +++ b/src/yuzu/configuration/configure_ui.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "yuzu/configuration/configure_ui.h" @@ -144,8 +144,8 @@ ConfigureUi::ConfigureUi(Core::System& system_, QWidget* parent) connect(ui->screenshot_path_button, &QToolButton::pressed, this, [this] { auto dir = QFileDialog::getExistingDirectory(this, tr("Select Screenshots Path..."), - QString::fromStdString(Common::FS::GetYuzuPathString( - Common::FS::YuzuPath::ScreenshotsDir))); + QString::fromStdString(Common::FS::GetSuyuPathString( + Common::FS::SuyuPath::ScreenshotsDir))); if (!dir.isEmpty()) { if (dir.back() != QChar::fromLatin1('/')) { dir.append(QChar::fromLatin1('/')); @@ -176,7 +176,7 @@ void ConfigureUi::ApplyConfiguration() { UISettings::values.row_2_text_id = ui->row_2_text_combobox->currentData().toUInt(); UISettings::values.enable_screenshot_save_as = ui->enable_screenshot_save_as->isChecked(); - Common::FS::SetYuzuPath(Common::FS::YuzuPath::ScreenshotsDir, + Common::FS::SetSuyuPath(Common::FS::SuyuPath::ScreenshotsDir, ui->screenshot_path_edit->text().toStdString()); const u32 height = ScreenshotDimensionToInt(ui->screenshot_height->currentText()); @@ -208,7 +208,7 @@ void ConfigureUi::SetConfiguration() { ui->enable_screenshot_save_as->setChecked( UISettings::values.enable_screenshot_save_as.GetValue()); ui->screenshot_path_edit->setText(QString::fromStdString( - Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir))); + Common::FS::GetSuyuPathString(Common::FS::SuyuPath::ScreenshotsDir))); const auto height = UISettings::values.screenshot_height.GetValue(); if (height == 0) { diff --git a/src/yuzu/configuration/input_profiles.cpp b/src/yuzu/configuration/input_profiles.cpp index ebebadc945..c1e518e9c3 100644 --- a/src/yuzu/configuration/input_profiles.cpp +++ b/src/yuzu/configuration/input_profiles.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2020 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -14,7 +14,7 @@ namespace FS = Common::FS; namespace { bool ProfileExistsInFilesystem(std::string_view profile_name) { - return FS::Exists(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "input" / + return FS::Exists(FS::GetSuyuPath(FS::SuyuPath::ConfigDir) / "input" / fmt::format("{}.ini", profile_name)); } @@ -29,7 +29,7 @@ std::filesystem::path GetNameWithoutExtension(std::filesystem::path filename) { } // namespace InputProfiles::InputProfiles() { - const auto input_profile_loc = FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "input"; + const auto input_profile_loc = FS::GetSuyuPath(FS::SuyuPath::ConfigDir) / "input"; if (!FS::IsDir(input_profile_loc)) { return; diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index b40af957c7..46af7478cb 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -1,6 +1,9 @@ -// SPDX-FileCopyrightText: 2015 Citra Emulator Project +// SPDX-FileCopyrightText: 2015 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// Modified by palfaiate on <2024/03/07> + + #include #include #include @@ -561,9 +564,6 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri remove_menu->addSeparator(); QAction* remove_shader_cache = remove_menu->addAction(tr("Remove All Pipeline Caches")); QAction* remove_all_content = remove_menu->addAction(tr("Remove All Installed Contents")); - QMenu* dump_romfs_menu = context_menu.addMenu(tr("Dump RomFS")); - QAction* dump_romfs = dump_romfs_menu->addAction(tr("Dump RomFS")); - QAction* dump_romfs_sdmc = dump_romfs_menu->addAction(tr("Dump RomFS to SDMC")); QAction* verify_integrity = context_menu.addAction(tr("Verify Integrity")); QAction* copy_tid = context_menu.addAction(tr("Copy Title ID to Clipboard")); QAction* navigate_to_gamedb_entry = context_menu.addAction(tr("Navigate to GameDB entry")); @@ -631,12 +631,6 @@ void GameList::AddGamePopup(QMenu& context_menu, u64 program_id, const std::stri connect(remove_cache_storage, &QAction::triggered, [this, program_id, path] { emit RemoveFileRequested(program_id, GameListRemoveTarget::CacheStorage, path); }); - connect(dump_romfs, &QAction::triggered, [this, program_id, path]() { - emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::Normal); - }); - connect(dump_romfs_sdmc, &QAction::triggered, [this, program_id, path]() { - emit DumpRomFSRequested(program_id, path, DumpRomFSTarget::SDMC); - }); connect(verify_integrity, &QAction::triggered, [this, path]() { emit VerifyIntegrityRequested(path); }); connect(copy_tid, &QAction::triggered, diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index 79f9c7ec0f..38fbc1f798 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h @@ -1,6 +1,9 @@ -// SPDX-FileCopyrightText: 2015 Citra Emulator Project +// SPDX-FileCopyrightText: 2015 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// Modified by palfaiate on <2024/03/07> + + #pragma once #include @@ -50,11 +53,6 @@ enum class GameListRemoveTarget { CacheStorage, }; -enum class DumpRomFSTarget { - Normal, - SDMC, -}; - enum class GameListShortcutTarget { Desktop, Applications, @@ -115,7 +113,6 @@ signals: void RemoveFileRequested(u64 program_id, GameListRemoveTarget target, const std::string& game_path); void RemovePlayTimeRequested(u64 program_id); - void DumpRomFSRequested(u64 program_id, const std::string& game_path, DumpRomFSTarget target); void VerifyIntegrityRequested(const std::string& game_path); void CopyTIDRequested(u64 program_id); void CreateShortcut(u64 program_id, const std::string& game_path, diff --git a/src/yuzu/game_list_worker.cpp b/src/yuzu/game_list_worker.cpp index 0cbf5f45e8..693e399c94 100644 --- a/src/yuzu/game_list_worker.cpp +++ b/src/yuzu/game_list_worker.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -38,7 +38,7 @@ QString GetGameListCachedObject(const std::string& filename, const std::string& } const auto path = - Common::FS::PathToUTF8String(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / + Common::FS::PathToUTF8String(Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list" / fmt::format("{}.{}", filename, ext)); void(Common::FS::CreateParentDirs(path)); @@ -70,7 +70,7 @@ std::pair, std::string> GetGameListCachedObject( } const auto game_list_dir = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / "game_list"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list"; const auto jpeg_name = fmt::format("{}.jpeg", filename); const auto app_name = fmt::format("{}.appname.txt", filename); diff --git a/src/yuzu/loading_screen.cpp b/src/yuzu/loading_screen.cpp index b081fff6b6..a9dc70f9ce 100644 --- a/src/yuzu/loading_screen.cpp +++ b/src/yuzu/loading_screen.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -19,7 +19,7 @@ // Mingw seems to not have QMovie at all. If QMovie is missing then use a single frame instead of an // showing the full animation -#if !YUZU_QT_MOVIE_MISSING +#if !SUYU_QT_MOVIE_MISSING #include #endif @@ -96,7 +96,7 @@ LoadingScreen::~LoadingScreen() = default; void LoadingScreen::Prepare(Loader::AppLoader& loader) { std::vector buffer; if (loader.ReadBanner(buffer) == Loader::ResultStatus::Success) { -#ifdef YUZU_QT_MOVIE_MISSING +#ifdef SUYU_QT_MOVIE_MISSING QPixmap map; map.loadFromData(buffer.data(), buffer.size()); ui->banner->setPixmap(map); @@ -194,7 +194,7 @@ void LoadingScreen::paintEvent(QPaintEvent* event) { } void LoadingScreen::Clear() { -#ifndef YUZU_QT_MOVIE_MISSING +#ifndef SUYU_QT_MOVIE_MISSING animation.reset(); backing_buf.reset(); backing_mem.reset(); diff --git a/src/yuzu/loading_screen.h b/src/yuzu/loading_screen.h index 17045595d3..ef12b59c39 100644 --- a/src/yuzu/loading_screen.h +++ b/src/yuzu/loading_screen.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2019 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -10,7 +10,7 @@ #include #if !QT_CONFIG(movie) -#define YUZU_QT_MOVIE_MISSING 1 +#define SUYU_QT_MOVIE_MISSING 1 #endif namespace Loader { @@ -64,7 +64,7 @@ signals: void Hidden(); private: -#ifndef YUZU_QT_MOVIE_MISSING +#ifndef SUYU_QT_MOVIE_MISSING std::unique_ptr animation; std::unique_ptr backing_buf; std::unique_ptr backing_mem; diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 7b22de62ac..b73542b317 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later // Modified by KawaiiBunga on <2024/03/07> @@ -54,12 +54,8 @@ #include "yuzu/multiplayer/state.h" #include "yuzu/util/controller_navigation.h" -// These are wrappers to avoid the calls to CreateDirectory and CreateFile because of the Windows +// These are wrappers to avoid the calls to CreateFile because of the Windows // defines. -static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper( - const FileSys::VirtualFilesystem& vfs, const std::string& path, FileSys::OpenMode mode) { - return vfs->CreateDirectory(path, mode); -} static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::VirtualDir& dir, const std::string& path) { @@ -225,7 +221,7 @@ void GMainWindow::ShowTelemetryCallout() { const int GMainWindow::max_recent_files_item; static void RemoveCachedContents() { - const auto cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir); + const auto cache_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir); const auto offline_fonts = cache_dir / "fonts"; const auto offline_manual = cache_dir / "offline_web_applet_manual"; const auto offline_legal_information = cache_dir / "offline_web_applet_legal_information"; @@ -1489,7 +1485,6 @@ void GMainWindow::ConnectWidgetEvents() { connect(game_list, &GameList::RemoveFileRequested, this, &GMainWindow::OnGameListRemoveFile); connect(game_list, &GameList::RemovePlayTimeRequested, this, &GMainWindow::OnGameListRemovePlayTimeData); - connect(game_list, &GameList::DumpRomFSRequested, this, &GMainWindow::OnGameListDumpRomFS); connect(game_list, &GameList::VerifyIntegrityRequested, this, &GMainWindow::OnGameListVerifyIntegrity); connect(game_list, &GameList::CopyTIDRequested, this, &GMainWindow::OnGameListCopyTID); @@ -1836,7 +1831,7 @@ bool GMainWindow::LoadROM(const QString& filename, Service::AM::FrontendAppletPa "This is usually caused by outdated GPU drivers, including integrated ones. " "Please see the log for more details. " "For more information on accessing the log, please see the following page: " - "" + "" "How to Upload the Log File. ")); break; default: @@ -2289,7 +2284,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target switch (target) { case GameListOpenTarget::SaveData: { open_target = tr("Save Data"); - const auto nand_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir); + const auto nand_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir); auto vfs_nand_dir = vfs->OpenDirectory(Common::FS::PathToUTF8String(nand_dir), FileSys::OpenMode::Read); @@ -2345,7 +2340,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target } case GameListOpenTarget::ModData: { open_target = tr("Mod Data"); - path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::LoadDir) / + path = Common::FS::GetSuyuPath(Common::FS::SuyuPath::LoadDir) / fmt::format("{:016X}", program_id); break; } @@ -2367,7 +2362,7 @@ void GMainWindow::OnGameListOpenFolder(u64 program_id, GameListOpenTarget target } void GMainWindow::OnTransferableShaderCacheOpenFile(u64 program_id) { - const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir); + const auto shader_cache_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir); const auto shader_cache_folder_path{shader_cache_dir / fmt::format("{:016x}", program_id)}; if (!Common::FS::CreateDirs(shader_cache_folder_path)) { QMessageBox::warning(this, tr("Error Opening Transferable Shader Cache"), @@ -2486,7 +2481,7 @@ void GMainWindow::OnGameListRemoveInstalledEntry(u64 program_id, InstalledEntryT RemoveAddOnContent(program_id, type); break; } - Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / + Common::FS::RemoveDirRecursively(Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list"); game_list->PopulateAsync(UISettings::values.game_dirs); } @@ -2592,7 +2587,7 @@ void GMainWindow::RemoveTransferableShaderCache(u64 program_id, GameListRemoveTa return ""; } }(); - const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir); + const auto shader_cache_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir); const auto shader_cache_folder_path = shader_cache_dir / fmt::format("{:016x}", program_id); const auto target_file = shader_cache_folder_path / target_file_name; @@ -2613,7 +2608,7 @@ void GMainWindow::RemoveTransferableShaderCache(u64 program_id, GameListRemoveTa void GMainWindow::RemoveVulkanDriverPipelineCache(u64 program_id) { static constexpr std::string_view target_file_name = "vulkan_pipelines.bin"; - const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir); + const auto shader_cache_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir); const auto shader_cache_folder_path = shader_cache_dir / fmt::format("{:016x}", program_id); const auto target_file = shader_cache_folder_path / target_file_name; @@ -2627,7 +2622,7 @@ void GMainWindow::RemoveVulkanDriverPipelineCache(u64 program_id) { } void GMainWindow::RemoveAllTransferableShaderCaches(u64 program_id) { - const auto shader_cache_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ShaderDir); + const auto shader_cache_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ShaderDir); const auto program_shader_cache_dir = shader_cache_dir / fmt::format("{:016x}", program_id); if (!Common::FS::Exists(program_shader_cache_dir)) { @@ -2650,7 +2645,7 @@ void GMainWindow::RemoveCustomConfiguration(u64 program_id, const std::string& g program_id == 0 ? Common::FS::PathToUTF8String(file_path.filename()).append(".ini") : fmt::format("{:016X}.ini", program_id); const auto custom_config_file_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "custom" / config_file_name; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir) / "custom" / config_file_name; if (!Common::FS::Exists(custom_config_file_path)) { QMessageBox::warning(this, tr("Error Removing Custom Configuration"), @@ -2668,7 +2663,7 @@ void GMainWindow::RemoveCustomConfiguration(u64 program_id, const std::string& g } void GMainWindow::RemoveCacheStorage(u64 program_id) { - const auto nand_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir); + const auto nand_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir); auto vfs_nand_dir = vfs->OpenDirectory(Common::FS::PathToUTF8String(nand_dir), FileSys::OpenMode::Read); @@ -2682,121 +2677,6 @@ void GMainWindow::RemoveCacheStorage(u64 program_id) { Common::FS::RemoveDirRecursively(path); } -void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_path, - DumpRomFSTarget target) { - const auto failed = [this] { - QMessageBox::warning(this, tr("RomFS Extraction Failed!"), - tr("There was an error copying the RomFS files or the user " - "cancelled the operation.")); - }; - - const auto loader = - Loader::GetLoader(*system, vfs->OpenFile(game_path, FileSys::OpenMode::Read)); - if (loader == nullptr) { - failed(); - return; - } - - FileSys::VirtualFile packed_update_raw{}; - loader->ReadUpdateRaw(packed_update_raw); - - const auto& installed = system->GetContentProvider(); - - u64 title_id{}; - u8 raw_type{}; - if (!SelectRomFSDumpTarget(installed, program_id, &title_id, &raw_type)) { - failed(); - return; - } - - const auto type = static_cast(raw_type); - const auto base_nca = installed.GetEntry(title_id, type); - if (!base_nca) { - failed(); - return; - } - - const FileSys::NCA update_nca{packed_update_raw, nullptr}; - if (type != FileSys::ContentRecordType::Program || - update_nca.GetStatus() != Loader::ResultStatus::ErrorMissingBKTRBaseRomFS || - update_nca.GetTitleId() != FileSys::GetUpdateTitleID(title_id)) { - packed_update_raw = {}; - } - - const auto base_romfs = base_nca->GetRomFS(); - const auto dump_dir = - target == DumpRomFSTarget::Normal - ? Common::FS::GetYuzuPath(Common::FS::YuzuPath::DumpDir) - : Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "atmosphere" / "contents"; - const auto romfs_dir = fmt::format("{:016X}/romfs", title_id); - - const auto path = Common::FS::PathToUTF8String(dump_dir / romfs_dir); - - const FileSys::PatchManager pm{title_id, system->GetFileSystemController(), installed}; - auto romfs = pm.PatchRomFS(base_nca.get(), base_romfs, type, packed_update_raw, false); - - const auto out = VfsFilesystemCreateDirectoryWrapper(vfs, path, FileSys::OpenMode::ReadWrite); - - if (out == nullptr) { - failed(); - vfs->DeleteDirectory(path); - return; - } - - bool ok = false; - const QStringList selections{tr("Full"), tr("Skeleton")}; - const auto res = QInputDialog::getItem( - this, tr("Select RomFS Dump Mode"), - tr("Please select the how you would like the RomFS dumped.
Full will copy all of the " - "files into the new directory while
skeleton will only create the directory " - "structure."), - selections, 0, false, &ok); - if (!ok) { - failed(); - vfs->DeleteDirectory(path); - return; - } - - const auto extracted = FileSys::ExtractRomFS(romfs); - if (extracted == nullptr) { - failed(); - return; - } - - const auto full = res == selections.constFirst(); - - // The expected required space is the size of the RomFS + 1 GiB - const auto minimum_free_space = romfs->GetSize() + 0x40000000; - - if (full && Common::FS::GetFreeSpaceSize(path) < minimum_free_space) { - QMessageBox::warning(this, tr("RomFS Extraction Failed!"), - tr("There is not enough free space at %1 to extract the RomFS. Please " - "free up space or select a different dump directory at " - "Emulation > Configure > System > Filesystem > Dump Root") - .arg(QString::fromStdString(path))); - return; - } - - QProgressDialog progress(tr("Extracting RomFS..."), tr("Cancel"), 0, 100, this); - progress.setWindowModality(Qt::WindowModal); - progress.setMinimumDuration(100); - progress.setAutoClose(false); - progress.setAutoReset(false); - - size_t read_size = 0; - - if (RomFSRawCopy(romfs->GetSize(), read_size, progress, extracted, out, full)) { - progress.close(); - QMessageBox::information(this, tr("RomFS Extraction Succeeded!"), - tr("The operation completed successfully.")); - QDesktopServices::openUrl(QUrl::fromLocalFile(QString::fromStdString(path))); - } else { - progress.close(); - failed(); - vfs->DeleteDirectory(path); - } -} - void GMainWindow::OnGameListVerifyIntegrity(const std::string& game_path) { const auto NotImplemented = [this] { QMessageBox::warning(this, tr("Integrity verification couldn't be performed!"), @@ -2982,10 +2862,10 @@ bool GMainWindow::CreateShortcutMessagesGUI(QWidget* parent, int imsg, const QSt bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_view game_file_name, std::filesystem::path& out_icon_path) { - // Get path to Suyu icons directory & icon extension + // Get path to suyu icons directory & icon extension std::string ico_extension = "png"; #if defined(_WIN32) - out_icon_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::IconsDir); + out_icon_path = Common::FS::GetSuyuPath(Common::FS::SuyuPath::IconsDir); ico_extension = "ico"; #elif defined(__linux__) || defined(__FreeBSD__) out_icon_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256"; @@ -3108,13 +2988,13 @@ void GMainWindow::OnGameListOpenDirectory(const QString& directory) { std::filesystem::path fs_path; if (directory == QStringLiteral("SDMC")) { fs_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "Nintendo/Contents/registered"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "Nintendo/Contents/registered"; } else if (directory == QStringLiteral("UserNAND")) { fs_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "user/Contents/registered"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "user/Contents/registered"; } else if (directory == QStringLiteral("SysNAND")) { fs_path = - Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/Contents/registered"; + Common::FS::GetSuyuPath(Common::FS::SuyuPath::NANDDir) / "system/Contents/registered"; } else { fs_path = directory.toStdString(); } @@ -3340,7 +3220,7 @@ void GMainWindow::OnMenuInstallToNAND() { : tr("%n file(s) failed to install\n", "", failed_files.size())); QMessageBox::information(this, tr("Install Results"), install_results); - Common::FS::RemoveDirRecursively(Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / + Common::FS::RemoveDirRecursively(Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list"); game_list->PopulateAsync(UISettings::values.game_dirs); ui->action_Install_File_NAND->setEnabled(true); @@ -3582,7 +3462,7 @@ void GMainWindow::OpenURL(const QUrl& url) { } void GMainWindow::OnOpenModsPage() { - OpenURL(QUrl(QStringLiteral("https://gitlab.com/suyu-emu/suyu/wiki/Switch-Mods"))); + OpenURL(QUrl(QStringLiteral("https://suyu.dev"))); } void GMainWindow::OnOpenQuickstartGuide() { @@ -3761,11 +3641,11 @@ void GMainWindow::OnConfigure() { LOG_WARNING(Frontend, "Failed to remove configuration file"); } if (!Common::FS::RemoveDirContentsRecursively( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir) / "custom")) { + Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir) / "custom")) { LOG_WARNING(Frontend, "Failed to remove custom configuration files"); } if (!Common::FS::RemoveDirRecursively( - Common::FS::GetYuzuPath(Common::FS::YuzuPath::CacheDir) / "game_list")) { + Common::FS::GetSuyuPath(Common::FS::SuyuPath::CacheDir) / "game_list")) { LOG_WARNING(Frontend, "Failed to remove game metadata cache files"); } @@ -4123,7 +4003,7 @@ void GMainWindow::LoadAmiibo(const QString& filename) { void GMainWindow::OnOpenYuzuFolder() { QDesktopServices::openUrl(QUrl::fromLocalFile( - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::YuzuDir)))); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::SuyuDir)))); } void GMainWindow::OnVerifyInstalledContents() { @@ -4338,7 +4218,7 @@ void GMainWindow::OnInstallDecryptionKeys() { return; } - const auto yuzu_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir); + const auto yuzu_keys_dir = Common::FS::GetSuyuPath(Common::FS::SuyuPath::KeysDir); for (auto key_file : source_key_files) { std::filesystem::path destination_key_file = yuzu_keys_dir / key_file.filename(); if (!std::filesystem::copy_file(key_file, destination_key_file, @@ -4491,7 +4371,7 @@ void GMainWindow::OnCaptureScreenshot() { const u64 title_id = system->GetApplicationProcessProgramID(); const auto screenshot_path = - QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir)); + QString::fromStdString(Common::FS::GetSuyuPathString(Common::FS::SuyuPath::ScreenshotsDir)); const auto date = QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz")); QString filename = QStringLiteral("%1/%2_%3.png") @@ -4519,7 +4399,7 @@ void GMainWindow::OnCaptureScreenshot() { // TODO: Written 2020-10-01: Remove per-game config migration code when it is irrelevant void GMainWindow::MigrateConfigFiles() { - const auto config_dir_fs_path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::ConfigDir); + const auto config_dir_fs_path = Common::FS::GetSuyuPath(Common::FS::SuyuPath::ConfigDir); const QDir config_dir = QDir(QString::fromStdString(Common::FS::PathToUTF8String(config_dir_fs_path))); const QStringList config_dir_list = config_dir.entryList(QStringList(QStringLiteral("*.ini"))); @@ -4838,66 +4718,6 @@ void GMainWindow::SetFirmwareVersion() { firmware_label->setToolTip(QString::fromStdString(display_title)); } -bool GMainWindow::SelectRomFSDumpTarget(const FileSys::ContentProvider& installed, u64 program_id, - u64* selected_title_id, u8* selected_content_record_type) { - using ContentInfo = std::tuple; - boost::container::flat_set available_title_ids; - - const auto RetrieveEntries = [&](FileSys::TitleType title_type, - FileSys::ContentRecordType record_type) { - const auto entries = installed.ListEntriesFilter(title_type, record_type); - for (const auto& entry : entries) { - if (FileSys::GetBaseTitleID(entry.title_id) == program_id && - installed.GetEntry(entry)->GetStatus() == Loader::ResultStatus::Success) { - available_title_ids.insert({entry.title_id, title_type, record_type}); - } - } - }; - - RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::Program); - RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::HtmlDocument); - RetrieveEntries(FileSys::TitleType::Application, FileSys::ContentRecordType::LegalInformation); - RetrieveEntries(FileSys::TitleType::AOC, FileSys::ContentRecordType::Data); - - if (available_title_ids.empty()) { - return false; - } - - size_t title_index = 0; - - if (available_title_ids.size() > 1) { - QStringList list; - for (auto& [title_id, title_type, record_type] : available_title_ids) { - const auto hex_title_id = QString::fromStdString(fmt::format("{:X}", title_id)); - if (record_type == FileSys::ContentRecordType::Program) { - list.push_back(QStringLiteral("Program [%1]").arg(hex_title_id)); - } else if (record_type == FileSys::ContentRecordType::HtmlDocument) { - list.push_back(QStringLiteral("HTML document [%1]").arg(hex_title_id)); - } else if (record_type == FileSys::ContentRecordType::LegalInformation) { - list.push_back(QStringLiteral("Legal information [%1]").arg(hex_title_id)); - } else { - list.push_back( - QStringLiteral("DLC %1 [%2]").arg(title_id & 0x7FF).arg(hex_title_id)); - } - } - - bool ok; - const auto res = QInputDialog::getItem( - this, tr("Select RomFS Dump Target"), - tr("Please select which RomFS you would like to dump."), list, 0, false, &ok); - if (!ok) { - return false; - } - - title_index = list.indexOf(res); - } - - const auto& [title_id, title_type, record_type] = *available_title_ids.nth(title_index); - *selected_title_id = title_id; - *selected_content_record_type = static_cast(record_type); - return true; -} - bool GMainWindow::ConfirmClose() { if (emu_thread == nullptr || UISettings::values.confirm_before_stopping.GetValue() == ConfirmStop::Ask_Never) { diff --git a/src/yuzu/main.h b/src/yuzu/main.h index fce643f3f8..ba217fbce6 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -1,6 +1,8 @@ -// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later +// Modified by palfaiate on <2024/03/07> + #pragma once #include @@ -49,7 +51,6 @@ class WaitTreeWidget; enum class GameListOpenTarget; enum class GameListRemoveTarget; enum class GameListShortcutTarget; -enum class DumpRomFSTarget; enum class InstalledEntryType; class GameListPlaceholder; @@ -348,7 +349,6 @@ private slots: void OnGameListRemoveFile(u64 program_id, GameListRemoveTarget target, const std::string& game_path); void OnGameListRemovePlayTimeData(u64 program_id); - void OnGameListDumpRomFS(u64 program_id, const std::string& game_path, DumpRomFSTarget target); void OnGameListVerifyIntegrity(const std::string& game_path); void OnGameListCopyTID(u64 program_id); void OnGameListNavigateToGamedbEntry(u64 program_id, diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index 91fefecc32..c9d6625836 100644 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -1,4 +1,5 @@ + MainWindow @@ -45,7 +46,7 @@ 0 0 1280 - 21 + 22
@@ -128,8 +129,8 @@ - - + + true diff --git a/src/yuzu/play_time_manager.cpp b/src/yuzu/play_time_manager.cpp index 94c99274dd..8f3a1530c8 100644 --- a/src/yuzu/play_time_manager.cpp +++ b/src/yuzu/play_time_manager.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "common/alignment.h" @@ -26,7 +26,7 @@ std::optional GetCurrentUserPlayTimePath( if (!uuid.has_value()) { return std::nullopt; } - return Common::FS::GetYuzuPath(Common::FS::YuzuPath::PlayTimeDir) / + return Common::FS::GetSuyuPath(Common::FS::SuyuPath::PlayTimeDir) / uuid->RawString().append(".bin"); } diff --git a/src/yuzu/play_time_manager.h b/src/yuzu/play_time_manager.h index 1714b91313..8a45386810 100644 --- a/src/yuzu/play_time_manager.h +++ b/src/yuzu/play_time_manager.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -26,8 +26,8 @@ public: explicit PlayTimeManager(Service::Account::ProfileManager& profile_manager); ~PlayTimeManager(); - YUZU_NON_COPYABLE(PlayTimeManager); - YUZU_NON_MOVEABLE(PlayTimeManager); + SUYU_NON_COPYABLE(PlayTimeManager); + SUYU_NON_MOVEABLE(PlayTimeManager); u64 GetPlayTime(u64 program_id) const; void ResetProgramPlayTime(u64 program_id); diff --git a/src/yuzu/startup_checks.cpp b/src/yuzu/startup_checks.cpp index 6eefc94ed0..26a70bda52 100644 --- a/src/yuzu/startup_checks.cpp +++ b/src/yuzu/startup_checks.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include "video_core/vulkan_common/vulkan_wrapper.h" @@ -7,7 +7,7 @@ #include #include #include -#elif defined(YUZU_UNIX) +#elif defined(SUYU_UNIX) #include #include #include @@ -56,7 +56,7 @@ bool CheckEnvVars(bool* is_child) { IS_CHILD_ENV_VAR, GetLastError()); return true; } -#elif defined(YUZU_UNIX) +#elif defined(SUYU_UNIX) const char* startup_check_var = getenv(STARTUP_CHECK_ENV_VAR); if (startup_check_var != nullptr && std::strncmp(startup_check_var, ENV_VAR_ENABLED_TEXT, 8) == 0) { @@ -110,7 +110,7 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka STARTUP_CHECK_ENV_VAR, GetLastError()); } -#elif defined(YUZU_UNIX) +#elif defined(SUYU_UNIX) const int env_var_set = setenv(STARTUP_CHECK_ENV_VAR, ENV_VAR_ENABLED_TEXT, 1); if (env_var_set == -1) { const int err = errno; @@ -175,7 +175,7 @@ bool SpawnChild(const char* arg0, PROCESS_INFORMATION* pi, int flags) { return true; } -#elif defined(YUZU_UNIX) +#elif defined(SUYU_UNIX) pid_t SpawnChild(const char* arg0) { const pid_t pid = fork(); diff --git a/src/yuzu/startup_checks.h b/src/yuzu/startup_checks.h index 2f86fb843d..f0fedc3812 100644 --- a/src/yuzu/startup_checks.h +++ b/src/yuzu/startup_checks.h @@ -1,16 +1,16 @@ -// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once #ifdef _WIN32 #include -#elif defined(YUZU_UNIX) +#elif defined(SUYU_UNIX) #include #endif -constexpr char IS_CHILD_ENV_VAR[] = "YUZU_IS_CHILD"; -constexpr char STARTUP_CHECK_ENV_VAR[] = "YUZU_DO_STARTUP_CHECKS"; +constexpr char IS_CHILD_ENV_VAR[] = "SUYU_IS_CHILD"; +constexpr char STARTUP_CHECK_ENV_VAR[] = "SUYU_DO_STARTUP_CHECKS"; constexpr char ENV_VAR_ENABLED_TEXT[] = "ON"; void CheckVulkan(); @@ -19,6 +19,6 @@ bool StartupChecks(const char* arg0, bool* has_broken_vulkan, bool perform_vulka #ifdef _WIN32 bool SpawnChild(const char* arg0, PROCESS_INFORMATION* pi, int flags); -#elif defined(YUZU_UNIX) +#elif defined(SUYU_UNIX) pid_t SpawnChild(const char* arg0); #endif diff --git a/src/yuzu/suyu.qrc b/src/yuzu/suyu.qrc index 87038fc28d..5d1f425a46 100644 --- a/src/yuzu/suyu.qrc +++ b/src/yuzu/suyu.qrc @@ -1,8 +1,6 @@ diff --git a/src/yuzu/suyu.rc b/src/yuzu/suyu.rc index 5390815ef2..5f5639721f 100644 --- a/src/yuzu/suyu.rc +++ b/src/yuzu/suyu.rc @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by JuanCStar on 2024/03/06 - #include "winresrc.h" ///////////////////////////////////////////////////////////////////////////// // diff --git a/src/yuzu/uisettings.cpp b/src/yuzu/uisettings.cpp index 7bb7e95af5..d7038bddcb 100644 --- a/src/yuzu/uisettings.cpp +++ b/src/yuzu/uisettings.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include @@ -57,7 +57,7 @@ u32 CalculateWidth(u32 height, Settings::AspectRatio ratio) { void SaveWindowState() { const auto window_state_config_loc = - FS::PathToUTF8String(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "window_state.ini"); + FS::PathToUTF8String(FS::GetSuyuPath(FS::SuyuPath::ConfigDir) / "window_state.ini"); void(FS::CreateParentDir(window_state_config_loc)); QSettings config(QString::fromStdString(window_state_config_loc), QSettings::IniFormat); @@ -73,12 +73,12 @@ void SaveWindowState() { void RestoreWindowState(std::unique_ptr& qtConfig) { const auto window_state_config_loc = - FS::PathToUTF8String(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "window_state.ini"); + FS::PathToUTF8String(FS::GetSuyuPath(FS::SuyuPath::ConfigDir) / "window_state.ini"); // Migrate window state from old location if (!FS::Exists(window_state_config_loc) && qtConfig->Exists("UI", "UILayout\\geometry")) { const auto config_loc = - FS::PathToUTF8String(FS::GetYuzuPath(FS::YuzuPath::ConfigDir) / "qt-config.ini"); + FS::PathToUTF8String(FS::GetSuyuPath(FS::SuyuPath::ConfigDir) / "qt-config.ini"); QSettings config(QString::fromStdString(config_loc), QSettings::IniFormat); config.beginGroup(QStringLiteral("UI")); diff --git a/src/yuzu/uisettings.h b/src/yuzu/uisettings.h index 03e42b9300..89fc353589 100644 --- a/src/yuzu/uisettings.h +++ b/src/yuzu/uisettings.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2016 Citra Emulator Project +// SPDX-FileCopyrightText: 2016 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -239,7 +239,7 @@ const std::array default_hotkeys{{ {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Change GPU Accuracy")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F9"), std::string("Home+R"), Qt::ApplicationShortcut, false}}, {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Continue/Pause Emulation")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F4"), std::string("Home+Plus"), Qt::WindowShortcut, false}}, {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Exit Fullscreen")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Esc"), std::string(""), Qt::WindowShortcut, false}}, - {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Exit yuzu")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+Q"), std::string("Home+Minus"), Qt::WindowShortcut, false}}, + {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Exit suyu")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+Q"), std::string("Home+Minus"), Qt::WindowShortcut, false}}, {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Fullscreen")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F11"), std::string("Home+B"), Qt::WindowShortcut, false}}, {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Load File")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("Ctrl+O"), std::string(""), Qt::WidgetWithChildrenShortcut, false}}, {QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Load/Remove Amiibo")).toStdString(), QStringLiteral(QT_TRANSLATE_NOOP("Hotkeys", "Main Window")).toStdString(), {std::string("F2"), std::string("Home+A"), Qt::WidgetWithChildrenShortcut, false}}, diff --git a/src/yuzu/vk_device_info.cpp b/src/yuzu/vk_device_info.cpp index ab0d39c256..7c79b2b485 100644 --- a/src/yuzu/vk_device_info.cpp +++ b/src/yuzu/vk_device_info.cpp @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #include diff --git a/src/yuzu/vk_device_info.h b/src/yuzu/vk_device_info.h index bda8262f4e..d3b24d35af 100644 --- a/src/yuzu/vk_device_info.h +++ b/src/yuzu/vk_device_info.h @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 yuzu Emulator Project +// SPDX-FileCopyrightText: 2023 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later #pragma once diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 8bedd8b9e3..f25f31e2b0 100644 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt @@ -1,8 +1,6 @@ # SPDX-FileCopyrightText: 2018 yuzu Emulator Project # SPDX-License-Identifier: GPL-2.0-or-later -# Modified by JuanCStar on 2024/03/06 - # Credits to Samantas5855 and others for this function. function(create_resource file output filename) # Read hex data from file diff --git a/src/yuzu_cmd/suyu.rc b/src/yuzu_cmd/suyu.rc index 696fac7ed3..1b3ae064dc 100644 --- a/src/yuzu_cmd/suyu.rc +++ b/src/yuzu_cmd/suyu.rc @@ -1,8 +1,6 @@ // SPDX-FileCopyrightText: 2018 yuzu Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -// Modified by JuanCStar on 2024/03/06 - #include "winresrc.h" ///////////////////////////////////////////////////////////////////////////// // From 2a5fe1719d91a062288197e585efe528a985c8e1 Mon Sep 17 00:00:00 2001 From: KawaiiBunga <20389496-KawaiiBunga@users.noreply.gitlab.com> Date: Thu, 7 Mar 2024 19:02:58 +0000 Subject: [PATCH 5/5] Get rid of header to fix build error --- src/yuzu/main.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 8e9d648d11..b73542b317 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1,11 +1,7 @@ // SPDX-FileCopyrightText: 2014 Citra Emulator Project & 2024 suyu Emulator Project // SPDX-License-Identifier: GPL-2.0-or-later -<<<<<<< HEAD // Modified by KawaiiBunga on <2024/03/07> -======= -// Modified by palfaiate on <2024/03/07> ->>>>>>> ba5b604f9a095524e7ae479b6c10d4e35f80e98f #include #include