2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Address review comments

This commit is contained in:
FearlessTobi 2024-02-19 15:43:18 +01:00
parent 2b18957365
commit b5a17b501b
9 changed files with 24 additions and 21 deletions

View file

@ -665,7 +665,7 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_initializeEmptyUserDirectory(JNIEnv*
ASSERT(user_id);
const auto user_save_data_path = FileSys::SaveDataFactory::GetFullPath(
{}, vfs_nand_dir, FileSys::SaveDataSpaceId::NandUser, FileSys::SaveDataType::SaveData, 1,
{}, vfs_nand_dir, FileSys::SaveDataSpaceId::User, FileSys::SaveDataType::Account, 1,
user_id->AsU128(), 0);
const auto full_path = Common::FS::ConcatPathSafe(nand_dir, user_save_data_path);
@ -833,8 +833,8 @@ jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getSavePath(JNIEnv* env, jobject j
FileSys::OpenMode::Read);
const auto user_save_data_path = FileSys::SaveDataFactory::GetFullPath(
{}, vfsNandDir, FileSys::SaveDataSpaceId::NandUser, FileSys::SaveDataType::SaveData,
program_id, user_id->AsU128(), 0);
{}, vfsNandDir, FileSys::SaveDataSpaceId::User, FileSys::SaveDataType::Account, program_id,
user_id->AsU128(), 0);
return Common::Android::ToJString(env, user_save_data_path);
}

View file

@ -598,7 +598,7 @@ add_library(core STATIC
hle/service/filesystem/fsp/fsp_pr.h
hle/service/filesystem/fsp/fsp_srv.cpp
hle/service/filesystem/fsp/fsp_srv.h
hle/service/filesystem/fsp/fsp_util.h
hle/service/filesystem/fsp/fsp_types.h
hle/service/filesystem/romfs_controller.cpp
hle/service/filesystem/romfs_controller.h
hle/service/filesystem/save_data_controller.cpp

View file

@ -4,6 +4,7 @@
#pragma once
#include <array>
#include <fmt/format.h>
#include "common/common_funcs.h"
#include "common/common_types.h"

View file

@ -5,7 +5,7 @@
#include "core/file_sys/vfs/vfs.h"
#include "core/hle/service/filesystem/filesystem.h"
#include "core/hle/service/filesystem/fsp/fsp_util.h"
#include "core/hle/service/filesystem/fsp/fsp_types.h"
#include "core/hle/service/service.h"
namespace Service::FileSystem {

View file

@ -2,6 +2,7 @@
// SPDX-License-Identifier: GPL-2.0-or-later
#include "core/hle/service/cmif_serialization.h"
#include "core/hle/service/filesystem/fsp/fs_i_filesystem.h"
#include "core/hle/service/filesystem/fsp/fs_i_multi_commit_manager.h"
namespace Service::FileSystem {
@ -17,7 +18,7 @@ IMultiCommitManager::IMultiCommitManager(Core::System& system_)
IMultiCommitManager::~IMultiCommitManager() = default;
Result IMultiCommitManager::Add() {
Result IMultiCommitManager::Add(std::shared_ptr<IFileSystem> filesystem) {
LOG_WARNING(Service_FS, "(STUBBED) called");
R_SUCCEED();

View file

@ -14,7 +14,7 @@ public:
~IMultiCommitManager() override;
private:
Result Add();
Result Add(std::shared_ptr<IFileSystem> filesystem);
Result Commit();
FileSys::VirtualFile backend;

View file

@ -23,14 +23,14 @@ public:
u64_le save_id_unknown;
FileSys::SaveDataSpaceId space;
FileSys::SaveDataType type;
INSERT_PADDING_BYTES_NOINIT(0x6);
INSERT_PADDING_BYTES(0x6);
std::array<u8, 0x10> user_id;
u64_le save_id;
u64_le title_id;
u64_le save_image_size;
u16_le index;
FileSys::SaveDataRank rank;
INSERT_PADDING_BYTES_NOINIT(0x25);
INSERT_PADDING_BYTES(0x25);
};
static_assert(sizeof(SaveDataInfo) == 0x60, "SaveDataInfo has incorrect size.");

View file

@ -6,6 +6,7 @@
#include <memory>
#include "core/file_sys/fs_save_data_types.h"
#include "core/hle/service/cmif_types.h"
#include "core/hle/service/filesystem/fsp/fsp_types.h"
#include "core/hle/service/service.h"
namespace Core {
@ -39,18 +40,6 @@ enum class AccessLogMode : u32 {
SdCard,
};
enum class FileSystemProxyType : u8 {
Code = 0,
Rom = 1,
Logo = 2,
Control = 3,
Manual = 4,
Meta = 5,
Data = 6,
Package = 7,
RegisteredUpdate = 8,
};
class FSP_SRV final : public ServiceFramework<FSP_SRV> {
public:
explicit FSP_SRV(Core::System& system_);

View file

@ -7,6 +7,18 @@
namespace Service::FileSystem {
enum class FileSystemProxyType : u8 {
Code = 0,
Rom = 1,
Logo = 2,
Control = 3,
Manual = 4,
Meta = 5,
Data = 6,
Package = 7,
RegisteredUpdate = 8,
};
struct SizeGetter {
std::function<u64()> get_free_size;
std::function<u64()> get_total_size;