diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 33 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.h | 1 |
2 files changed, 33 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 @@ | |||
| 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); |