mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-12-23 00:40:58 +01:00
am: stub CreateCacheStorage
This commit is contained in:
parent
13e4ceb990
commit
62bcb99ba8
2 changed files with 33 additions and 1 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include "core/file_sys/savedata_factory.h"
|
#include "core/file_sys/savedata_factory.h"
|
||||||
#include "core/hle/kernel/k_event.h"
|
#include "core/hle/kernel/k_event.h"
|
||||||
#include "core/hle/kernel/k_transfer_memory.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/acc/profile_manager.h"
|
||||||
#include "core/hle/service/am/am.h"
|
#include "core/hle/service/am/am.h"
|
||||||
#include "core/hle/service/am/applet_ae.h"
|
#include "core/hle/service/am/applet_ae.h"
|
||||||
|
@ -1335,7 +1336,7 @@ IApplicationFunctions::IApplicationFunctions(Core::System& system_)
|
||||||
{24, nullptr, "GetLaunchStorageInfoForDebug"},
|
{24, nullptr, "GetLaunchStorageInfoForDebug"},
|
||||||
{25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"},
|
{25, &IApplicationFunctions::ExtendSaveData, "ExtendSaveData"},
|
||||||
{26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"},
|
{26, &IApplicationFunctions::GetSaveDataSize, "GetSaveDataSize"},
|
||||||
{27, nullptr, "CreateCacheStorage"},
|
{27, &IApplicationFunctions::CreateCacheStorage, "CreateCacheStorage"},
|
||||||
{28, nullptr, "GetSaveDataSizeMax"},
|
{28, nullptr, "GetSaveDataSizeMax"},
|
||||||
{29, nullptr, "GetCacheStorageMax"},
|
{29, nullptr, "GetCacheStorageMax"},
|
||||||
{30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"},
|
{30, &IApplicationFunctions::BeginBlockingHomeButtonShortAndLongPressed, "BeginBlockingHomeButtonShortAndLongPressed"},
|
||||||
|
@ -1738,6 +1739,36 @@ void IApplicationFunctions::GetSaveDataSize(HLERequestContext& ctx) {
|
||||||
rb.Push(size.journal);
|
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) {
|
void IApplicationFunctions::QueryApplicationPlayStatistics(HLERequestContext& ctx) {
|
||||||
LOG_WARNING(Service_AM, "(STUBBED) called");
|
LOG_WARNING(Service_AM, "(STUBBED) called");
|
||||||
|
|
||||||
|
|
|
@ -333,6 +333,7 @@ private:
|
||||||
void GetPseudoDeviceId(HLERequestContext& ctx);
|
void GetPseudoDeviceId(HLERequestContext& ctx);
|
||||||
void ExtendSaveData(HLERequestContext& ctx);
|
void ExtendSaveData(HLERequestContext& ctx);
|
||||||
void GetSaveDataSize(HLERequestContext& ctx);
|
void GetSaveDataSize(HLERequestContext& ctx);
|
||||||
|
void CreateCacheStorage(HLERequestContext& ctx);
|
||||||
void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
|
void BeginBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
|
||||||
void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
|
void EndBlockingHomeButtonShortAndLongPressed(HLERequestContext& ctx);
|
||||||
void BeginBlockingHomeButton(HLERequestContext& ctx);
|
void BeginBlockingHomeButton(HLERequestContext& ctx);
|
||||||
|
|
Loading…
Reference in a new issue