mirror of
https://git.suyu.dev/suyu/suyu
synced 2025-08-31 16:36:34 -05:00
Rebrand Common FS Path functions
This commit is contained in:
@@ -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 <algorithm>
|
||||
@@ -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::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<Key128> 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<Ticket> 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};
|
||||
|
@@ -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 <fmt/format.h>
|
||||
@@ -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) {
|
||||
|
@@ -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 <algorithm>
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
|
@@ -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 <cstring>
|
||||
@@ -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)) {
|
||||
|
@@ -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<u32>(document_kind) - 1], title_id);
|
||||
|
||||
|
@@ -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 <sstream>
|
||||
@@ -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<const u8> 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);
|
||||
|
@@ -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 <utility>
|
||||
@@ -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 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<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 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<FileSys::BISFactory>(
|
||||
|
@@ -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";
|
||||
}
|
||||
|
||||
|
@@ -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");
|
||||
}
|
||||
|
||||
|
@@ -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<u8> 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<const u8> 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, ""));
|
||||
|
||||
|
@@ -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 <fstream>
|
||||
@@ -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");
|
||||
}
|
||||
|
@@ -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 <algorithm>
|
||||
@@ -12,7 +12,7 @@
|
||||
#ifdef _WIN32
|
||||
#include <winsock2.h>
|
||||
#include <ws2tcpip.h>
|
||||
#elif YUZU_UNIX
|
||||
#elif SUYU_UNIX
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
@@ -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<s32, Errno> Socket::Send(std::span<const u8> 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<const char*>(message.data()),
|
||||
|
@@ -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 <winsock2.h>
|
||||
#elif YUZU_UNIX
|
||||
#elif SUYU_UNIX
|
||||
#include <netinet/in.h>
|
||||
#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<u8>(bytes), static_cast<u8>(bytes >> 8),
|
||||
|
@@ -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 <chrono>
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "core/internal_network/socket_proxy.h"
|
||||
#include "network/network.h"
|
||||
|
||||
#if YUZU_UNIX
|
||||
#if SUYU_UNIX
|
||||
#include <sys/socket.h>
|
||||
#endif
|
||||
|
||||
|
@@ -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 <utility>
|
||||
|
||||
#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;
|
||||
|
@@ -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 <algorithm>
|
||||
@@ -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::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;
|
||||
|
@@ -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 <ctime>
|
||||
@@ -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};
|
||||
|
@@ -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 <array>
|
||||
@@ -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};
|
||||
|
Reference in New Issue
Block a user