diff options
author | bunnei <bunneidev@gmail.com> | 2023-05-13 01:42:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-13 01:42:17 +0200 |
commit | 021e503cc8ea56d4743a6512eee770020f62ea83 (patch) | |
tree | 8048d14b3075aa00ac1bce9e903c98f1864d0a94 /src/core/hle/service/am/am.cpp | |
parent | Merge pull request #10236 from liamwhite/thats-not-an-ibinder (diff) | |
parent | fs: adjust future save path (diff) | |
download | yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.tar yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.tar.gz yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.tar.bz2 yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.tar.lz yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.tar.xz yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.tar.zst yuzu-021e503cc8ea56d4743a6512eee770020f62ea83.zip |
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 33 |
1 files changed, 32 insertions, 1 deletions
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 @@ #include "core/file_sys/savedata_factory.h" #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_transfer_memory.h" +#include "core/hle/result.h" #include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/am/am.h" #include "core/hle/service/am/applet_ae.h" @@ -1335,7 +1336,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_) {24, nullptr, "GetLaunchStorageInfoForDebug"}, {25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"}, {26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"}, - {27, nullptr, "CreateCacheStorage"}, + {27, &IApplicationFunctions::CreateCacheStorage, "CreateCacheStorage"}, {28, nullptr, "GetSaveDataSizeMax"}, {29, nullptr, "GetCacheStorageMax"}, {30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"}, @@ -1738,6 +1739,36 @@ void IApplicationFunctions::GetSaveDataSize(HLERequestContext& ctx) { rb.Push(size.journal); } +void IApplicationFunctions::CreateCacheStorage(HLERequestContext& ctx) { + struct InputParameters { + u16 index; + s64 size; + s64 journal_size; + }; + static_assert(sizeof(InputParameters) == 24); + + struct OutputParameters { + u32 storage_target; + u64 required_size; + }; + static_assert(sizeof(OutputParameters) == 16); + + IPC::RequestParser rp{ctx}; + const auto params = rp.PopRaw<InputParameters>(); + + LOG_WARNING(Service_AM, "(STUBBED) called with index={}, size={:#x}, journal_size={:#x}", + params.index, params.size, params.journal_size); + + const OutputParameters resp{ + .storage_target = 1, + .required_size = 0, + }; + + IPC::ResponseBuilder rb{ctx, 6}; + rb.Push(ResultSuccess); + rb.PushRaw(resp); +} + void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) { LOG_WARNING(Service_AM, "(STUBBED) called"); |