1
0
mirror of https://git.suyu.dev/suyu/suyu synced 2025-09-14 18:17:59 -05:00

Rebrand Common FS Path functions

This commit is contained in:
JuanCStar
2024-03-07 09:21:59 +00:00
committed by Crimson Hawk
parent e8f646b0fd
commit 16dfc39f89
97 changed files with 347 additions and 369 deletions

View File

@@ -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)
@@ -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)

View File

@@ -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 <QIcon>
#include <fmt/format.h>
#include "common/scm_rev.h"

View File

@@ -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 <memory>

View File

@@ -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 <mutex>
@@ -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));
}

View File

@@ -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(), '\\', '/');

View File

@@ -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 <algorithm>
@@ -13,7 +13,7 @@
#include <QtCore/qglobal.h>
#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 <QCamera>
#include <QCameraImageCapture>
#include <QCameraInfo>
@@ -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
}

View File

@@ -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<u32> camera_data;

View File

@@ -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 <algorithm>
@@ -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)

View File

@@ -33,7 +33,7 @@
<item>
<widget class="QLabel" name="lbl_Spiel">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Should you choose to submit a test case to the &lt;/span&gt;&lt;a href=&quot;https://yuzu-emu.org/game/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;yuzu Compatibility List&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;, The following information will be collected and displayed on the site:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Hardware Information (CPU / GPU / Operating System)&lt;/li&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Which version of yuzu you are running&lt;/li&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The connected yuzu account&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;Should you choose to submit a test case to the &lt;/span&gt;&lt;a href=&quot;https://suyu-emu.org/game/&quot;&gt;&lt;span style=&quot; font-size:10pt; text-decoration: underline; color:#0000ff;&quot;&gt;suyu Compatibility List&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:10pt;&quot;&gt;, The following information will be collected and displayed on the site:&lt;/span&gt;&lt;/p&gt;&lt;ul style=&quot;margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; -qt-list-indent: 1;&quot;&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Hardware Information (CPU / GPU / Operating System)&lt;/li&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Which version of suyu you are running&lt;/li&gt;&lt;li style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;The connected suyu account&lt;/li&gt;&lt;/ul&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="wordWrap">
<bool>true</bool>

View File

@@ -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 <memory>
#include <QtCore>
#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 <QCameraImageCapture>
#include <QCameraInfo>
#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<QCameraInfo> 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());

View File

@@ -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<QCamera> camera;
std::unique_ptr<QCameraImageCapture> camera_capture;
#endif

View File

@@ -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 <QDesktopServices>
@@ -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));
});

View File

@@ -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 <QFileDialog>
@@ -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);

View File

@@ -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 <QColorDialog>
@@ -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

View File

@@ -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 <algorithm>
@@ -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));
}

View File

@@ -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 <algorithm>
@@ -35,7 +35,7 @@ constexpr std::array<u8, 107> 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"),

View File

@@ -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 <QFileDialog>
@@ -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());

View File

@@ -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) {

View File

@@ -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 <fmt/format.h>
@@ -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;

View File

@@ -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 <memory>
@@ -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::vector<u8>, 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);

View File

@@ -1,8 +1,6 @@
// SPDX-FileCopyrightText: 2014 Citra Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
// Modified by JuanCStar on 2024/03/06
#include <cinttypes>
#include <clocale>
#include <cmath>
@@ -225,7 +223,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";
@@ -372,13 +370,13 @@ GMainWindow::GMainWindow(std::unique_ptr<QtConfig> 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();
@@ -1338,7 +1336,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"));
@@ -2289,7 +2287,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 +2343,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 +2365,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 +2484,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 +2590,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 +2611,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 +2625,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 +2648,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 +2666,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);
@@ -2726,8 +2724,8 @@ void GMainWindow::OnGameListDumpRomFS(u64 program_id, const std::string& game_pa
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";
? Common::FS::GetSuyuPath(Common::FS::SuyuPath::DumpDir)
: Common::FS::GetSuyuPath(Common::FS::SuyuPath::SDMCDir) / "atmosphere" / "contents";
const auto romfs_dir = fmt::format("{:016X}/romfs", title_id);
const auto path = Common::FS::PathToUTF8String(dump_dir / romfs_dir);
@@ -2985,7 +2983,7 @@ bool GMainWindow::MakeShortcutIcoPath(const u64 program_id, const std::string_vi
// Get path to Yuzu 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 +3106,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 +3338,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);
@@ -3761,11 +3759,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 +4121,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 +4336,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 +4489,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 +4517,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")));

View File

@@ -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<std::filesystem::path> 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");
}

View File

@@ -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 <cstring>
#include <processthreadsapi.h>
#include <windows.h>
#elif defined(YUZU_UNIX)
#elif defined(SUYU_UNIX)
#include <cstring>
#include <errno.h>
#include <spawn.h>
@@ -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();

View File

@@ -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 <windows.h>
#elif defined(YUZU_UNIX)
#elif defined(SUYU_UNIX)
#include <sys/types.h>
#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

View File

@@ -1,8 +1,6 @@
<!--
SPDX-FileCopyrightText: 2021 yuzu Emulator Project & 2024 suyu Emulator Project
SPDX-License-Identifier: GPL-2.0-or-later
Modified by JuanCStar on 2024/03/06
-->
<RCC>

View File

@@ -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"
/////////////////////////////////////////////////////////////////////////////
//

View File

@@ -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 <QSettings>
@@ -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>& 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"));

View File

@@ -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<Shortcut, 28> 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}},

View File

@@ -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 <utility>

View File

@@ -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