diff options
author | FearlessTobi <thm.frey@gmail.com> | 2024-02-19 15:36:20 +0100 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2024-02-19 19:06:31 +0100 |
commit | 2b18957365d8f369626ec3b94277621df2fe1729 (patch) | |
tree | 16997564f581190e10eb8de9de552aa37bd856ff /src/core/hle/service | |
parent | fsp: Migrate remaining interfaces to cmif serialization (diff) | |
download | yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.gz yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.bz2 yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.lz yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.xz yuzu-2b18957365d8f369626ec3b94277621df2fe1729.tar.zst yuzu-2b18957365d8f369626ec3b94277621df2fe1729.zip |
Diffstat (limited to 'src/core/hle/service')
4 files changed, 28 insertions, 28 deletions
diff --git a/src/core/hle/service/am/service/application_functions.cpp b/src/core/hle/service/am/service/application_functions.cpp index cb53b07e0..bfccb6b09 100644 --- a/src/core/hle/service/am/service/application_functions.cpp +++ b/src/core/hle/service/am/service/application_functions.cpp @@ -123,13 +123,13 @@ Result IApplicationFunctions::EnsureSaveData(Out<u64> out_size, Common::UUID use LOG_INFO(Service_AM, "called, uid={}", user_id.FormattedString()); FileSys::SaveDataAttribute attribute{}; - attribute.title_id = m_applet->program_id; + attribute.program_id = m_applet->program_id; attribute.user_id = user_id.AsU128(); - attribute.type = FileSys::SaveDataType::SaveData; + attribute.type = FileSys::SaveDataType::Account; FileSys::VirtualDir save_data{}; R_TRY(system.GetFileSystemController().OpenSaveDataController()->CreateSaveData( - &save_data, FileSys::SaveDataSpaceId::NandUser, attribute)); + &save_data, FileSys::SaveDataSpaceId::User, attribute)); *out_size = 0; R_SUCCEED(); diff --git a/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.cpp b/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.cpp index 0d9b0dcaf..ff823586b 100644 --- a/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.cpp +++ b/src/core/hle/service/filesystem/fsp/fs_i_save_data_info_reader.cpp @@ -72,7 +72,7 @@ void ISaveDataInfoReader::FindAllSaves(FileSys::SaveDataSpaceId space) { for (const auto& type : save_root->GetSubdirectories()) { if (type->GetName() == "save") { FindNormalSaves(space, type); - } else if (space == FileSys::SaveDataSpaceId::TemporaryStorage) { + } else if (space == FileSys::SaveDataSpaceId::Temporary) { FindTemporaryStorageSaves(space, type); } } @@ -96,7 +96,7 @@ void ISaveDataInfoReader::FindNormalSaves(FileSys::SaveDataSpaceId space, info.emplace_back(SaveDataInfo{ 0, space, - FileSys::SaveDataType::SystemSaveData, + FileSys::SaveDataType::System, {}, user_id_numeric, save_id_numeric, @@ -115,8 +115,7 @@ void ISaveDataInfoReader::FindNormalSaves(FileSys::SaveDataSpaceId space, info.emplace_back(SaveDataInfo{ 0, space, - device ? FileSys::SaveDataType::DeviceSaveData - : FileSys::SaveDataType::SaveData, + device ? FileSys::SaveDataType::Device : FileSys::SaveDataType::Account, {}, user_id_numeric, save_id_numeric, @@ -145,7 +144,7 @@ void ISaveDataInfoReader::FindTemporaryStorageSaves(FileSys::SaveDataSpaceId spa info.emplace_back(SaveDataInfo{ 0, space, - FileSys::SaveDataType::TemporaryStorage, + FileSys::SaveDataType::Temporary, {}, user_id_numeric, stoull_be(type->GetName()), diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp index 2f3b01595..fc67a4713 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.cpp @@ -224,23 +224,23 @@ Result FSP_SRV::OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface) { R_SUCCEED(); } -Result FSP_SRV::CreateSaveDataFileSystem(std::array<u8, 0x40> save_create_struct, +Result FSP_SRV::CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct, u128 uid) { LOG_DEBUG(Service_FS, "called save_struct = {}, uid = {:016X}{:016X}", save_struct.DebugInfo(), uid[1], uid[0]); FileSys::VirtualDir save_data_dir{}; - R_RETURN(save_data_controller->CreateSaveData(&save_data_dir, - FileSys::SaveDataSpaceId::NandUser, save_struct)); + R_RETURN(save_data_controller->CreateSaveData(&save_data_dir, FileSys::SaveDataSpaceId::User, + save_struct)); } -Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId(std::array<u8, 0x40> save_create_struct, - FileSys::SaveDataAttribute save_struct) { +Result FSP_SRV::CreateSaveDataFileSystemBySystemSaveDataId( + FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct) { LOG_DEBUG(Service_FS, "called save_struct = {}", save_struct.DebugInfo()); FileSys::VirtualDir save_data_dir{}; - R_RETURN(save_data_controller->CreateSaveData( - &save_data_dir, FileSys::SaveDataSpaceId::NandSystem, save_struct)); + R_RETURN(save_data_controller->CreateSaveData(&save_data_dir, FileSys::SaveDataSpaceId::System, + save_struct)); } Result FSP_SRV::OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface, @@ -253,17 +253,17 @@ Result FSP_SRV::OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface, FileSys::StorageId id{}; switch (space_id) { - case FileSys::SaveDataSpaceId::NandUser: + case FileSys::SaveDataSpaceId::User: id = FileSys::StorageId::NandUser; break; - case FileSys::SaveDataSpaceId::SdCardSystem: - case FileSys::SaveDataSpaceId::SdCardUser: + case FileSys::SaveDataSpaceId::SdSystem: + case FileSys::SaveDataSpaceId::SdUser: id = FileSys::StorageId::SdCard; break; - case FileSys::SaveDataSpaceId::NandSystem: + case FileSys::SaveDataSpaceId::System: id = FileSys::StorageId::NandSystem; break; - case FileSys::SaveDataSpaceId::TemporaryStorage: + case FileSys::SaveDataSpaceId::Temporary: case FileSys::SaveDataSpaceId::ProperSystem: case FileSys::SaveDataSpaceId::SafeMode: ASSERT(false); @@ -302,8 +302,8 @@ Result FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage( OutInterface<ISaveDataInfoReader> out_interface) { LOG_WARNING(Service_FS, "(STUBBED) called"); - *out_interface = std::make_shared<ISaveDataInfoReader>( - system, save_data_controller, FileSys::SaveDataSpaceId::TemporaryStorage); + *out_interface = std::make_shared<ISaveDataInfoReader>(system, save_data_controller, + FileSys::SaveDataSpaceId::Temporary); R_SUCCEED(); } @@ -323,11 +323,11 @@ Result FSP_SRV::ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute( [[maybe_unused]] constexpr auto flags = static_cast<u32>(FileSys::SaveDataFlags::None); LOG_WARNING(Service_FS, - "(STUBBED) called, flags={}, space_id={}, attribute.title_id={:016X}\n" + "(STUBBED) called, flags={}, space_id={}, attribute.program_id={:016X}\n" "attribute.user_id={:016X}{:016X}, attribute.save_id={:016X}\n" "attribute.type={}, attribute.rank={}, attribute.index={}", - flags, space_id, attribute.title_id, attribute.user_id[1], attribute.user_id[0], - attribute.save_id, attribute.type, attribute.rank, attribute.index); + flags, space_id, attribute.program_id, attribute.user_id[1], attribute.user_id[0], + attribute.system_save_data_id, attribute.type, attribute.rank, attribute.index); R_SUCCEED(); } diff --git a/src/core/hle/service/filesystem/fsp/fsp_srv.h b/src/core/hle/service/filesystem/fsp/fsp_srv.h index 0669c4922..7a29d17c9 100644 --- a/src/core/hle/service/filesystem/fsp/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp/fsp_srv.h @@ -4,6 +4,7 @@ #pragma once #include <memory> +#include "core/file_sys/fs_save_data_types.h" #include "core/hle/service/cmif_types.h" #include "core/hle/service/service.h" @@ -60,10 +61,10 @@ private: Result OpenFileSystemWithPatch(OutInterface<IFileSystem> out_interface, FileSystemProxyType type, u64 open_program_id); Result OpenSdCardFileSystem(OutInterface<IFileSystem> out_interface); - Result CreateSaveDataFileSystem(std::array<u8, 0x40> save_create_struct, + Result CreateSaveDataFileSystem(FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct, u128 uid); - Result CreateSaveDataFileSystemBySystemSaveDataId(std::array<u8, 0x40> save_create_struct, - FileSys::SaveDataAttribute save_struct); + Result CreateSaveDataFileSystemBySystemSaveDataId( + FileSys::SaveDataCreationInfo save_create_struct, FileSys::SaveDataAttribute save_struct); Result OpenSaveDataFileSystem(OutInterface<IFileSystem> out_interface, FileSys::SaveDataSpaceId space_id, FileSys::SaveDataAttribute attribute); |