diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/file_sys/savedata_factory.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 33 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.cpp | 17 | ||||
| -rw-r--r-- | src/core/hle/service/filesystem/fsp_srv.h | 1 |
5 files changed, 50 insertions, 6 deletions
diff --git a/src/core/file_sys/savedata_factory.cpp b/src/core/file_sys/savedata_factory.cpp index 769065b6f..70b36f170 100644 --- a/src/core/file_sys/savedata_factory.cpp +++ b/src/core/file_sys/savedata_factory.cpp | |||
| @@ -82,9 +82,9 @@ std::string GetFutureSaveDataPath(SaveDataSpaceId space_id, SaveDataType type, u | |||
| 82 | // Only detect account/device saves from the future location. | 82 | // Only detect account/device saves from the future location. |
| 83 | switch (type) { | 83 | switch (type) { |
| 84 | case SaveDataType::SaveData: | 84 | case SaveDataType::SaveData: |
| 85 | return fmt::format("{}/account/{}/{:016X}/1", space_id_path, uuid.RawString(), title_id); | 85 | return fmt::format("{}/account/{}/{:016X}/0", space_id_path, uuid.RawString(), title_id); |
| 86 | case SaveDataType::DeviceSaveData: | 86 | case SaveDataType::DeviceSaveData: |
| 87 | return fmt::format("{}/device/{:016X}/1", space_id_path, title_id); | 87 | return fmt::format("{}/device/{:016X}/0", space_id_path, title_id); |
| 88 | default: | 88 | default: |
| 89 | return ""; | 89 | return ""; |
| 90 | } | 90 | } |
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index e59de844c..a2375508a 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include "core/file_sys/savedata_factory.h" | 13 | #include "core/file_sys/savedata_factory.h" |
| 14 | #include "core/hle/kernel/k_event.h" | 14 | #include "core/hle/kernel/k_event.h" |
| 15 | #include "core/hle/kernel/k_transfer_memory.h" | 15 | #include "core/hle/kernel/k_transfer_memory.h" |
| 16 | #include "core/hle/result.h" | ||
| 16 | #include "core/hle/service/acc/profile_manager.h" | 17 | #include "core/hle/service/acc/profile_manager.h" |
| 17 | #include "core/hle/service/am/am.h" | 18 | #include "core/hle/service/am/am.h" |
| 18 | #include "core/hle/service/am/applet_ae.h" | 19 | #include "core/hle/service/am/applet_ae.h" |
| @@ -1335,7 +1336,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_) | |||
| 1335 | {24, nullptr, "GetLaunchStorageInfoForDebug"}, | 1336 | {24, nullptr, "GetLaunchStorageInfoForDebug"}, |
| 1336 | {25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"}, | 1337 | {25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"}, |
| 1337 | {26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"}, | 1338 | {26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"}, |
| 1338 | {27, nullptr, "CreateCacheStorage"}, | 1339 | {27, &IApplicationFunctions::CreateCacheStorage, "CreateCacheStorage"}, |
| 1339 | {28, nullptr, "GetSaveDataSizeMax"}, | 1340 | {28, nullptr, "GetSaveDataSizeMax"}, |
| 1340 | {29, nullptr, "GetCacheStorageMax"}, | 1341 | {29, nullptr, "GetCacheStorageMax"}, |
| 1341 | {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"}, | 1342 | {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"}, |
| @@ -1738,6 +1739,36 @@ void IApplicationFunctions::GetSaveDataSize(HLERequestContext& ctx) { | |||
| 1738 | rb.Push(size.journal); | 1739 | rb.Push(size.journal); |
| 1739 | } | 1740 | } |
| 1740 | 1741 | ||
| 1742 | void IApplicationFunctions::CreateCacheStorage(HLERequestContext& ctx) { | ||
| 1743 | struct InputParameters { | ||
| 1744 | u16 index; | ||
| 1745 | s64 size; | ||
| 1746 | s64 journal_size; | ||
| 1747 | }; | ||
| 1748 | static_assert(sizeof(InputParameters) == 24); | ||
| 1749 | |||
| 1750 | struct OutputParameters { | ||
| 1751 | u32 storage_target; | ||
| 1752 | u64 required_size; | ||
| 1753 | }; | ||
| 1754 | static_assert(sizeof(OutputParameters) == 16); | ||
| 1755 | |||
| 1756 | IPC::RequestParser rp{ctx}; | ||
| 1757 | const auto params = rp.PopRaw<InputParameters>(); | ||
| 1758 | |||
| 1759 | LOG_WARNING(Service_AM, "(STUBBED) called with index={}, size={:#x}, journal_size={:#x}", | ||
| 1760 | params.index, params.size, params.journal_size); | ||
| 1761 | |||
| 1762 | const OutputParameters resp{ | ||
| 1763 | .storage_target = 1, | ||
| 1764 | .required_size = 0, | ||
| 1765 | }; | ||
| 1766 | |||
| 1767 | IPC::ResponseBuilder rb{ctx, 6}; | ||
| 1768 | rb.Push(ResultSuccess); | ||
| 1769 | rb.PushRaw(resp); | ||
| 1770 | } | ||
| 1771 | |||
| 1741 | void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) { | 1772 | void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) { |
| 1742 | LOG_WARNING(Service_AM, "(STUBBED) called"); | 1773 | LOG_WARNING(Service_AM, "(STUBBED) called"); |
| 1743 | 1774 | ||
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h index 0dbc6485e..d4fd163da 100644 --- a/src/core/hle/service/am/am.h +++ b/src/core/hle/service/am/am.h | |||
| @@ -333,6 +333,7 @@ private: | |||
| 333 | void GetPseudoDeviceId(HLERequestContext& ctx); | 333 | void GetPseudoDeviceId(HLERequestContext& ctx); |
| 334 | void ExtendSaveData(HLERequestContext& ctx); | 334 | void ExtendSaveData(HLERequestContext& ctx); |
| 335 | void GetSaveDataSize(HLERequestContext& ctx); | 335 | void GetSaveDataSize(HLERequestContext& ctx); |
| 336 | void CreateCacheStorage(HLERequestContext& ctx); | ||
| 336 | void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx); | 337 | void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx); |
| 337 | void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx); | 338 | void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx); |
| 338 | void BeginBlockingHomeButton(HLERequestContext& ctx); | 339 | void BeginBlockingHomeButton(HLERequestContext& ctx); |
diff --git a/src/core/hle/service/filesystem/fsp_srv.cpp b/src/core/hle/service/filesystem/fsp_srv.cpp index 9e559d97e..f73a864c3 100644 --- a/src/core/hle/service/filesystem/fsp_srv.cpp +++ b/src/core/hle/service/filesystem/fsp_srv.cpp | |||
| @@ -24,8 +24,10 @@ | |||
| 24 | #include "core/file_sys/savedata_factory.h" | 24 | #include "core/file_sys/savedata_factory.h" |
| 25 | #include "core/file_sys/system_archive/system_archive.h" | 25 | #include "core/file_sys/system_archive/system_archive.h" |
| 26 | #include "core/file_sys/vfs.h" | 26 | #include "core/file_sys/vfs.h" |
| 27 | #include "core/hle/result.h" | ||
| 27 | #include "core/hle/service/filesystem/filesystem.h" | 28 | #include "core/hle/service/filesystem/filesystem.h" |
| 28 | #include "core/hle/service/filesystem/fsp_srv.h" | 29 | #include "core/hle/service/filesystem/fsp_srv.h" |
| 30 | #include "core/hle/service/hle_ipc.h" | ||
| 29 | #include "core/hle/service/ipc_helpers.h" | 31 | #include "core/hle/service/ipc_helpers.h" |
| 30 | #include "core/reporter.h" | 32 | #include "core/reporter.h" |
| 31 | 33 | ||
| @@ -552,9 +554,9 @@ public: | |||
| 552 | // Write the data to memory | 554 | // Write the data to memory |
| 553 | ctx.WriteBuffer(begin, range_size); | 555 | ctx.WriteBuffer(begin, range_size); |
| 554 | 556 | ||
| 555 | IPC::ResponseBuilder rb{ctx, 3}; | 557 | IPC::ResponseBuilder rb{ctx, 4}; |
| 556 | rb.Push(ResultSuccess); | 558 | rb.Push(ResultSuccess); |
| 557 | rb.Push<u32>(static_cast<u32>(actual_entries)); | 559 | rb.Push<u64>(actual_entries); |
| 558 | } | 560 | } |
| 559 | 561 | ||
| 560 | private: | 562 | private: |
| @@ -712,7 +714,7 @@ FSP_SRV::FSP_SRV(Core::System& system_) | |||
| 712 | {59, nullptr, "WriteSaveDataFileSystemExtraData"}, | 714 | {59, nullptr, "WriteSaveDataFileSystemExtraData"}, |
| 713 | {60, nullptr, "OpenSaveDataInfoReader"}, | 715 | {60, nullptr, "OpenSaveDataInfoReader"}, |
| 714 | {61, &FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, | 716 | {61, &FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId, "OpenSaveDataInfoReaderBySaveDataSpaceId"}, |
| 715 | {62, nullptr, "OpenCacheStorageList"}, | 717 | {62, &FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage, "OpenSaveDataInfoReaderOnlyCacheStorage"}, |
| 716 | {64, nullptr, "OpenSaveDataInternalStorageFileSystem"}, | 718 | {64, nullptr, "OpenSaveDataInternalStorageFileSystem"}, |
| 717 | {65, nullptr, "UpdateSaveDataMacForDebug"}, | 719 | {65, nullptr, "UpdateSaveDataMacForDebug"}, |
| 718 | {66, nullptr, "WriteSaveDataFileSystemExtraData2"}, | 720 | {66, nullptr, "WriteSaveDataFileSystemExtraData2"}, |
| @@ -921,6 +923,15 @@ void FSP_SRV::OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx) { | |||
| 921 | std::make_shared<ISaveDataInfoReader>(system, space, fsc)); | 923 | std::make_shared<ISaveDataInfoReader>(system, space, fsc)); |
| 922 | } | 924 | } |
| 923 | 925 | ||
| 926 | void FSP_SRV::OpenSaveDataInfoReaderOnlyCacheStorage(HLERequestContext& ctx) { | ||
| 927 | LOG_WARNING(Service_FS, "(STUBBED) called"); | ||
| 928 | |||
| 929 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 930 | rb.Push(ResultSuccess); | ||
| 931 | rb.PushIpcInterface<ISaveDataInfoReader>(system, FileSys::SaveDataSpaceId::TemporaryStorage, | ||
| 932 | fsc); | ||
| 933 | } | ||
| 934 | |||
| 924 | void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx) { | 935 | void FSP_SRV::WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx) { |
| 925 | LOG_WARNING(Service_FS, "(STUBBED) called."); | 936 | LOG_WARNING(Service_FS, "(STUBBED) called."); |
| 926 | 937 | ||
diff --git a/src/core/hle/service/filesystem/fsp_srv.h b/src/core/hle/service/filesystem/fsp_srv.h index 49f17c7c3..4f3c2f6de 100644 --- a/src/core/hle/service/filesystem/fsp_srv.h +++ b/src/core/hle/service/filesystem/fsp_srv.h | |||
| @@ -42,6 +42,7 @@ private: | |||
| 42 | void OpenSaveDataFileSystem(HLERequestContext& ctx); | 42 | void OpenSaveDataFileSystem(HLERequestContext& ctx); |
| 43 | void OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx); | 43 | void OpenReadOnlySaveDataFileSystem(HLERequestContext& ctx); |
| 44 | void OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx); | 44 | void OpenSaveDataInfoReaderBySaveDataSpaceId(HLERequestContext& ctx); |
| 45 | void OpenSaveDataInfoReaderOnlyCacheStorage(HLERequestContext& ctx); | ||
| 45 | void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx); | 46 | void WriteSaveDataFileSystemExtraDataBySaveDataAttribute(HLERequestContext& ctx); |
| 46 | void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx); | 47 | void ReadSaveDataFileSystemExtraDataWithMaskBySaveDataAttribute(HLERequestContext& ctx); |
| 47 | void OpenDataStorageByCurrentProcess(HLERequestContext& ctx); | 48 | void OpenDataStorageByCurrentProcess(HLERequestContext& ctx); |