chore: update project branding to Citron

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-05-06 16:08:59 +10:00
parent bfb82e577c
commit 5e16e20427
122 changed files with 448 additions and 448 deletions

View File

@@ -372,7 +372,7 @@ Key128 DeriveKeyblobMACKey(const Key128& keyblob_key, const Key128& mac_source)
std::optional<Key128> DeriveSDSeed() {
const auto system_save_43_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/8000000000000043";
Common::FS::GetCitronPath(Common::FS::CitronPath::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<Key128> DeriveSDSeed() {
}
const auto sd_private_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::SDMCDir) / "Nintendo/Contents/private";
Common::FS::GetCitronPath(Common::FS::CitronPath::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 citron_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
if (!Common::FS::CreateDir(citron_keys_dir)) {
LOG_ERROR(Core, "Failed to create the keys directory.");
@@ -847,7 +847,7 @@ Key256 KeyManager::GetBISKey(u8 partition_id) const {
template <size_t Size>
void KeyManager::WriteKeyToFile(KeyCategory category, std::string_view keyname,
const std::array<u8, Size>& key) {
const auto citron_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
std::string filename = "title.keys_autogenerated";
@@ -869,7 +869,7 @@ void KeyManager::WriteKeyToFile(KeyCategory category, std::string_view keyname,
if (add_info_text) {
void(file.WriteString(
"# This file is autogenerated by Yuzu\n"
"# This file is autogenerated by Citron\n"
"# It serves to store keys that were automatically generated from the normal keys\n"
"# If you are experiencing issues involving keys, it may help to delete this file\n"));
}
@@ -947,7 +947,7 @@ void KeyManager::SetKey(S256KeyType id, Key256 key, u64 field1, u64 field2) {
}
bool KeyManager::KeyFileExists(bool title) {
const auto citron_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
if (title) {
return Common::FS::Exists(citron_keys_dir / "title.keys");
@@ -1197,7 +1197,7 @@ void KeyManager::PopulateTickets() {
std::vector<Ticket> tickets;
const auto system_save_e1_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e1";
Common::FS::GetCitronPath(Common::FS::CitronPath::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};
@@ -1206,7 +1206,7 @@ void KeyManager::PopulateTickets() {
}
const auto system_save_e2_path =
Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) / "system/save/80000000000000e2";
Common::FS::GetCitronPath(Common::FS::CitronPath::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};

View File

@@ -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::GetCitronPathString(Common::FS::CitronPath::NANDDir), OpenMode::Read)};
keys.PopulateFromPartitionData(pdm);
switch (id) {

View File

@@ -437,7 +437,7 @@ void RegisteredCache::ProcessFiles(const std::vector<NcaID>& ids) {
}
}
void RegisteredCache::AccumulateYuzuMeta() {
void RegisteredCache::AccumulateCitronMeta() {
const auto meta_dir = dir->GetSubdirectory("citron_meta");
if (meta_dir == nullptr) {
return;
@@ -460,7 +460,7 @@ void RegisteredCache::Refresh() {
const auto ids = AccumulateFiles();
ProcessFiles(ids);
AccumulateYuzuMeta();
AccumulateCitronMeta();
}
RegisteredCache::RegisteredCache(VirtualDir dir_, ContentProviderParsingFunction parsing_function)
@@ -668,7 +668,7 @@ InstallResult RegisteredCache::InstallEntry(const NCA& nca, TitleType type,
mbedtls_sha256_ret(data.data(), data.size(), c_rec.hash.data(), 0);
std::memcpy(&c_rec.nca_id, &c_rec.hash, 16);
const CNMT new_cnmt(header, opt_header, {c_rec}, {});
if (!RawInstallYuzuMeta(new_cnmt)) {
if (!RawInstallCitronMeta(new_cnmt)) {
return InstallResult::ErrorMetaFailed;
}
return RawInstallNCA(nca, copy, overwrite_if_exists, c_rec.nca_id);
@@ -693,7 +693,7 @@ InstallResult RegisteredCache::InstallEntry(const NCA& nca, const CNMTHeader& ba
};
const OptionalHeader opt_header{0, 0};
const CNMT new_cnmt(header, opt_header, {base_record}, {});
if (!RawInstallYuzuMeta(new_cnmt)) {
if (!RawInstallCitronMeta(new_cnmt)) {
return InstallResult::ErrorMetaFailed;
}
return RawInstallNCA(nca, copy, overwrite_if_exists, base_record.nca_id);
@@ -802,7 +802,7 @@ InstallResult RegisteredCache::RawInstallNCA(const NCA& nca, const VfsCopyFuncti
: InstallResult::ErrorCopyFailed;
}
bool RegisteredCache::RawInstallYuzuMeta(const CNMT& cnmt) {
bool RegisteredCache::RawInstallCitronMeta(const CNMT& cnmt) {
// Reasoning behind this method can be found in the comment for InstallEntry, NCA overload.
const auto meta_dir = dir->CreateDirectoryRelative("citron_meta");
const auto filename = GetCNMTName(cnmt.GetType(), cnmt.GetTitleID());

View File

@@ -184,13 +184,13 @@ private:
std::function<bool(const CNMT&, const ContentRecord&)> filter) const;
std::vector<NcaID> AccumulateFiles() const;
void ProcessFiles(const std::vector<NcaID>& ids);
void AccumulateYuzuMeta();
void AccumulateCitronMeta();
std::optional<NcaID> GetNcaIDFromMetadata(u64 title_id, ContentRecordType type) const;
VirtualFile GetFileAtID(NcaID id) const;
VirtualFile OpenFileOrDirectoryConcat(const VirtualDir& open_dir, std::string_view path) const;
InstallResult RawInstallNCA(const NCA& nca, const VfsCopyFunction& copy,
bool overwrite_if_exists, std::optional<NcaID> override_id = {});
bool RawInstallYuzuMeta(const CNMT& cnmt);
bool RawInstallCitronMeta(const CNMT& cnmt);
VirtualDir dir;
ContentProviderParsingFunction parser;

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::NANDDir) /
fmt::format("system/save/8000000000000010/su/avators/{}.jpg", uuid.FormattedString());
}
@@ -833,7 +833,7 @@ Result Module::Interface::InitializeApplicationInfoBase() {
case FileSys::StorageId::Host:
case FileSys::StorageId::NandUser:
case FileSys::StorageId::SdCard:
case FileSys::StorageId::None: // Yuzu specific, differs from hardware
case FileSys::StorageId::None: // Citron specific, differs from hardware
application_info.application_type = ApplicationType::Digital;
break;
default:

View File

@@ -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::GetCitronPath(FS::CitronPath::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::GetCitronPath(FS::CitronPath::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::GetCitronPath(FS::CitronPath::NANDDir) / ACC_SAVE_AVATORS_BASE_PATH /
"profiles.dat");
if (!FS::CreateParentDirs(save_path)) {

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::CacheDir) /
fmt::format("offline_web_applet_{}/{:016X}",
RESOURCE_TYPES[static_cast<u32>(document_kind) - 1], title_id);

View File

@@ -353,7 +353,7 @@ Result ISelfController::GetAccumulatedSuspendedTickValue(
LOG_DEBUG(Service_AM, "called.");
// This command returns the total number of system ticks since ISelfController creation
// where the game was suspended. Since Yuzu doesn't implement game suspension, this command
// where the game was suspended. Since Citron doesn't implement game suspension, this command
// can just always return 0 ticks.
std::scoped_lock lk{m_applet->lock};
*out_accumulated_suspended_tick_value = m_applet->suspended_ticks;

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::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<const u8> image,
u64 title_id, const AlbumFileDateTime& date) const {
const auto screenshot_path =
Common::FS::GetYuzuPathString(Common::FS::YuzuPath::ScreenshotsDir);
Common::FS::GetCitronPathString(Common::FS::CitronPath::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);

View File

@@ -66,7 +66,7 @@ enum class FatalType : u32 {
static void GenerateErrorReport(Core::System& system, Result error_code, const FatalInfo& info) {
const auto title_id = system.GetApplicationProcessProgramID();
std::string crash_report = fmt::format(
"Yuzu {}-{} crash report\n"
"Citron {}-{} crash report\n"
"Title ID: {:016x}\n"
"Result: 0x{:X} ({:04}-{:04d})\n"
"Set flags: 0x{:16X}\n"

View File

@@ -346,12 +346,12 @@ std::shared_ptr<SaveDataController> FileSystemController::OpenSaveDataController
std::shared_ptr<FileSys::SaveDataFactory> FileSystemController::CreateSaveDataFactory(
ProgramId program_id) {
using YuzuPath = Common::FS::YuzuPath;
using CitronPath = Common::FS::CitronPath;
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::GetCitronPathString(CitronPath::NANDDir), rw_mode);
return std::make_shared<FileSys::SaveDataFactory>(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 CitronPath = Common::FS::CitronPath;
const auto sdmc_dir_path = Common::FS::GetCitronPath(CitronPath::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::GetCitronPathString(CitronPath::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::GetCitronPathString(CitronPath::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::GetCitronPathString(CitronPath::DumpDir), rw_mode);
if (bis_factory == nullptr) {
bis_factory = std::make_unique<FileSys::BISFactory>(

View File

@@ -109,7 +109,7 @@ protected:
void SendPacket(const Network::LDNPacket& packet);
static const LanEventFunc empty_func;
static constexpr Ssid fake_ssid{"YuzuFakeSsidForLdn"};
static constexpr Ssid fake_ssid{"CitronFakeSsidForLdn"};
bool inited{};
std::mutex packet_mutex;

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::NANDDir) / "system/save/8000000000000030";
if (is_test_db) {
system_save_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::NANDDir) /
system_save_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::NANDDir) /
"system/save/8000000000000031";
}

View File

@@ -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 citron_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
const Common::FS::IOFile keys_file{citron_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 citron_keys_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::KeysDir);
const auto citron_keys_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::KeysDir);
return Common::FS::Exists(citron_keys_dir / "key_retail.bin");
}

View File

@@ -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 citron_amiibo_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::AmiiboDir);
const auto citron_amiibo_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::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<u8> data) const {
ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size");
constexpr auto backup_dir = "backup";
const auto citron_amiibo_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::AmiiboDir);
const auto citron_amiibo_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::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<const u8> data) {
ASSERT_MSG(uuid_size < sizeof(UniqueSerialNumber), "Invalid UUID size");
constexpr auto backup_dir = "backup";
const auto citron_amiibo_dir = Common::FS::GetYuzuPath(Common::FS::YuzuPath::AmiiboDir);
const auto citron_amiibo_dir = Common::FS::GetCitronPath(Common::FS::CitronPath::AmiiboDir);
const auto file_name =
fmt::format("{0:02x}.bin", fmt::join(uid.begin(), uid.begin() + uuid_size, ""));

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::NANDDir) / "system/save/8000000000000054";
if (!StoreSettingsFile(appln_dir, m_appln_settings)) {
LOG_ERROR(Service_SET, "Failed to store ApplLn settings");
}

View File

@@ -34,7 +34,7 @@ static void OneTimeInit() {
SCH_USE_STRONG_CRYPTO | // don't allow insecure protocols
SCH_CRED_NO_SERVERNAME_CHECK | // don't validate server names
SCH_CRED_NO_DEFAULT_CREDS; // don't automatically present a client certificate
// ^ I'm assuming that nobody would want to connect Yuzu to a
// ^ I'm assuming that nobody would want to connect Citron to a
// service that requires some OS-provided corporate client
// certificate, and presenting one to some arbitrary server
// might be a privacy concern? Who knows, though.

View File

@@ -39,7 +39,7 @@ PerfStats::~PerfStats() {
std::copy(perf_history.begin() + IgnoreFrames, perf_history.begin() + current_index,
std::ostream_iterator<double>(stream, "\n"));
const auto path = Common::FS::GetYuzuPath(Common::FS::YuzuPath::LogDir);
const auto path = Common::FS::GetCitronPath(Common::FS::CitronPath::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;

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::LogDir) / type /
fmt::format("{:016X}_{}.json", title_id, timestamp);
}
@@ -51,7 +51,7 @@ void SaveToFile(const json& json, const std::filesystem::path& filename) {
file << std::setw(4) << json << std::endl;
}
json GetYuzuVersionData() {
json GetCitronVersionData() {
return {
{"scm_rev", std::string(Common::g_scm_rev)},
{"scm_branch", std::string(Common::g_scm_branch)},
@@ -112,7 +112,7 @@ json GetProcessorStateData(const std::string& architecture, u64 entry_point, u64
json GetFullDataAuto(const std::string& timestamp, u64 title_id, Core::System& system) {
json out;
out["citron_version"] = GetYuzuVersionData();
out["citron_version"] = GetCitronVersionData();
out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp);
return out;
@@ -180,7 +180,7 @@ void Reporter::SaveCrashReport(u64 title_id, Result result, u64 set_flags, u64 e
const auto timestamp = GetTimestamp();
json out;
out["citron_version"] = GetYuzuVersionData();
out["citron_version"] = GetCitronVersionData();
out["report_common"] = GetReportCommonData(title_id, result, timestamp);
auto proc_out = GetProcessorStateData(arch, entry_point, sp, pc, pstate, registers, backtrace);
@@ -291,7 +291,7 @@ void Reporter::SavePlayReport(PlayReportType type, u64 title_id,
const auto timestamp = GetTimestamp();
json out;
out["citron_version"] = GetYuzuVersionData();
out["citron_version"] = GetCitronVersionData();
out["report_common"] = GetReportCommonData(title_id, ResultSuccess, timestamp, user_id);
auto data_out = json::array();
@@ -319,7 +319,7 @@ void Reporter::SaveErrorReport(u64 title_id, Result result,
const auto timestamp = GetTimestamp();
json out;
out["citron_version"] = GetYuzuVersionData();
out["citron_version"] = GetCitronVersionData();
out["report_common"] = GetReportCommonData(title_id, result, timestamp);
out["error_custom_text"] = {
@@ -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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::SDMCDir) / "FsAccessLog.txt";
Common::FS::IOFile access_log_file{access_log_path, Common::FS::FileAccessMode::Write,
Common::FS::FileType::TextFile};

View File

@@ -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::GetCitronPath(Common::FS::CitronPath::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::GetCitronPath(Common::FS::CitronPath::ConfigDir) / "telemetry_id";
Common::FS::IOFile file{filename, Common::FS::FileAccessMode::Write,
Common::FS::FileType::BinaryFile};