Stub IApplicationFunctions::GetSaveDataSize

This commit is contained in:
PabloG02 2023-03-07 00:13:39 +01:00 committed by Billy Laws
parent 6703a875f0
commit b4280a61ac
2 changed files with 17 additions and 0 deletions

View File

@ -80,6 +80,20 @@ namespace skyline::service::am {
return {};
}
Result IApplicationFunctions::GetSaveDataSize(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
auto saveDataType{request.Pop<u64>()};
auto userId{request.Pop<account::UserId>()};
Logger::Debug("Save data type: {}, UserId: {:016X}{:016X}", saveDataType, userId.upper, userId.lower);
// Response values based on Ryujinx stub
// https://github.com/Ryujinx/Ryujinx/blob/b8556530f2b160db70ff571adf25ae26d4b8f58f/Ryujinx.HLE/HOS/Services/Am/AppletOE/ApplicationProxyService/ApplicationProxy/IApplicationFunctions.cs#L228
static constexpr u64 SaveDataSize{200000000};
static constexpr u64 JournalSaveDataSize{200000000};
response.Push(SaveDataSize);
response.Push(JournalSaveDataSize);
return {};
}
Result IApplicationFunctions::NotifyRunning(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
response.Push<u8>(1);
return {};

View File

@ -56,6 +56,8 @@ namespace skyline::service::am {
*/
Result GetDisplayVersion(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
Result GetSaveDataSize(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Returns if the application is running or not, always returns true
* @url https://switchbrew.org/wiki/Applet_Manager_services#NotifyRunning
@ -144,6 +146,7 @@ namespace skyline::service::am {
SFUNC(0x15, IApplicationFunctions, GetDesiredLanguage),
SFUNC(0x16, IApplicationFunctions, SetTerminateResult),
SFUNC(0x17, IApplicationFunctions, GetDisplayVersion),
SFUNC(0x1A, IApplicationFunctions, GetSaveDataSize),
SFUNC(0x28, IApplicationFunctions, NotifyRunning),
SFUNC(0x32, IApplicationFunctions, GetPseudoDeviceId),
SFUNC(0x42, IApplicationFunctions, InitializeGamePlayRecording),