mirror of
https://git.citron-emu.org/citron/emulator
synced 2025-12-20 02:53:57 +00:00
chore: update project branding to Citron
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
@@ -223,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::GetCitronPath(Common::FS::CitronPath::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";
|
||||
@@ -1600,7 +1600,7 @@ void GMainWindow::ConnectMenuEvents() {
|
||||
connect_menu(ui->action_Configure_Tas, &GMainWindow::OnConfigureTas);
|
||||
|
||||
// Help
|
||||
connect_menu(ui->action_Open_citron_Folder, &GMainWindow::OnOpenYuzuFolder);
|
||||
connect_menu(ui->action_Open_citron_Folder, &GMainWindow::OnOpenCitronFolder);
|
||||
connect_menu(ui->action_Verify_installed_contents, &GMainWindow::OnVerifyInstalledContents);
|
||||
connect_menu(ui->action_Install_Firmware, &GMainWindow::OnInstallFirmware);
|
||||
connect_menu(ui->action_Install_Keys, &GMainWindow::OnInstallDecryptionKeys);
|
||||
@@ -2288,7 +2288,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::GetCitronPath(Common::FS::CitronPath::NANDDir);
|
||||
auto vfs_nand_dir =
|
||||
vfs->OpenDirectory(Common::FS::PathToUTF8String(nand_dir), FileSys::OpenMode::Read);
|
||||
|
||||
@@ -2344,7 +2344,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::GetCitronPath(Common::FS::CitronPath::LoadDir) /
|
||||
fmt::format("{:016X}", program_id);
|
||||
break;
|
||||
}
|
||||
@@ -2366,7 +2366,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::GetCitronPath(Common::FS::CitronPath::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"),
|
||||
@@ -2485,7 +2485,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::GetCitronPath(Common::FS::CitronPath::CacheDir) /
|
||||
"game_list");
|
||||
game_list->PopulateAsync(UISettings::values.game_dirs);
|
||||
}
|
||||
@@ -2591,7 +2591,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::GetCitronPath(Common::FS::CitronPath::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;
|
||||
|
||||
@@ -2612,7 +2612,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::GetCitronPath(Common::FS::CitronPath::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;
|
||||
|
||||
@@ -2626,7 +2626,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::GetCitronPath(Common::FS::CitronPath::ShaderDir);
|
||||
const auto program_shader_cache_dir = shader_cache_dir / fmt::format("{:016x}", program_id);
|
||||
|
||||
if (!Common::FS::Exists(program_shader_cache_dir)) {
|
||||
@@ -2649,7 +2649,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::GetCitronPath(Common::FS::CitronPath::ConfigDir) / "custom" / config_file_name;
|
||||
|
||||
if (!Common::FS::Exists(custom_config_file_path)) {
|
||||
QMessageBox::warning(this, tr("Error Removing Custom Configuration"),
|
||||
@@ -2667,7 +2667,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::GetCitronPath(Common::FS::CitronPath::NANDDir);
|
||||
auto vfs_nand_dir =
|
||||
vfs->OpenDirectory(Common::FS::PathToUTF8String(nand_dir), FileSys::OpenMode::Read);
|
||||
|
||||
@@ -2725,8 +2725,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::GetCitronPath(Common::FS::CitronPath::DumpDir)
|
||||
: Common::FS::GetCitronPath(Common::FS::CitronPath::SDMCDir) / "atmosphere" / "contents";
|
||||
const auto romfs_dir = fmt::format("{:016X}/romfs", title_id);
|
||||
|
||||
const auto path = Common::FS::PathToUTF8String(dump_dir / romfs_dir);
|
||||
@@ -2981,10 +2981,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 Yuzu icons directory & icon extension
|
||||
// Get path to Citron 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::GetCitronPath(Common::FS::CitronPath::IconsDir);
|
||||
ico_extension = "ico";
|
||||
#elif defined(__linux__) || defined(__FreeBSD__)
|
||||
out_icon_path = Common::FS::GetDataDirectory("XDG_DATA_HOME") / "icons/hicolor/256x256";
|
||||
@@ -3107,13 +3107,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::GetCitronPath(Common::FS::CitronPath::SDMCDir) / "Nintendo/Contents/registered";
|
||||
} else if (directory == QStringLiteral("UserNAND")) {
|
||||
fs_path =
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "user/Contents/registered";
|
||||
Common::FS::GetCitronPath(Common::FS::CitronPath::NANDDir) / "user/Contents/registered";
|
||||
} else if (directory == QStringLiteral("SysNAND")) {
|
||||
fs_path =
|
||||
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/Contents/registered";
|
||||
Common::FS::GetCitronPath(Common::FS::CitronPath::NANDDir) / "system/Contents/registered";
|
||||
} else {
|
||||
fs_path = directory.toStdString();
|
||||
}
|
||||
@@ -3339,7 +3339,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::GetCitronPath(Common::FS::CitronPath::CacheDir) /
|
||||
"game_list");
|
||||
game_list->PopulateAsync(UISettings::values.game_dirs);
|
||||
ui->action_Install_File_NAND->setEnabled(true);
|
||||
@@ -3759,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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::CacheDir) / "game_list")) {
|
||||
LOG_WARNING(Frontend, "Failed to remove game metadata cache files");
|
||||
}
|
||||
|
||||
@@ -4119,9 +4119,9 @@ void GMainWindow::LoadAmiibo(const QString& filename) {
|
||||
}
|
||||
}
|
||||
|
||||
void GMainWindow::OnOpenYuzuFolder() {
|
||||
void GMainWindow::OnOpenCitronFolder() {
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(
|
||||
QString::fromStdString(Common::FS::GetYuzuPathString(Common::FS::YuzuPath::YuzuDir))));
|
||||
QString::fromStdString(Common::FS::GetCitronPathString(Common::FS::CitronPath::CitronDir))));
|
||||
}
|
||||
|
||||
void GMainWindow::OnVerifyInstalledContents() {
|
||||
@@ -4336,7 +4336,7 @@ void GMainWindow::OnInstallDecryptionKeys() {
|
||||
return;
|
||||
}
|
||||
|
||||
const auto citron_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
|
||||
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
|
||||
for (auto key_file : source_key_files) {
|
||||
std::filesystem::path destination_key_file = citron_keys_dir / key_file.filename();
|
||||
if (!std::filesystem::copy_file(key_file, destination_key_file,
|
||||
@@ -4489,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::GetCitronPathString(Common::FS::CitronPath::ScreenshotsDir));
|
||||
const auto date =
|
||||
QDateTime::currentDateTime().toString(QStringLiteral("yyyy-MM-dd_hh-mm-ss-zzz"));
|
||||
QString filename = QStringLiteral("%1/%2_%3.png")
|
||||
@@ -4517,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::GetCitronPath(Common::FS::CitronPath::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")));
|
||||
|
||||
Reference in New Issue
Block a user