diff options
| author | 2020-12-08 09:10:31 -0500 | |
|---|---|---|
| committer | 2020-12-08 13:39:07 -0500 | |
| commit | 009bdb3558a1b4c0b08d532b61fc2b34076cc824 (patch) | |
| tree | f7173e7d8d6fa578f3cb4349f25583f0c6b6dc2e /src/core/hle/service/aoc | |
| parent | Merge pull request #5156 from comex/xx-raws (diff) | |
| download | yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.gz yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.xz yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.zip | |
aoc_u: Stub Create(Permanent)EcPurchasedEventManager
- Used by Pokémon Café Mix
- Used by DOOM: Eternal
Diffstat (limited to 'src/core/hle/service/aoc')
| -rw-r--r-- | src/core/hle/service/aoc/aoc_u.cpp | 38 | ||||
| -rw-r--r-- | src/core/hle/service/aoc/aoc_u.h | 2 |
2 files changed, 38 insertions, 2 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 6abac3f78..4e668d062 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp | |||
| @@ -48,6 +48,24 @@ static std::vector<u64> AccumulateAOCTitleIDs(Core::System& system) { | |||
| 48 | return add_on_content; | 48 | return add_on_content; |
| 49 | } | 49 | } |
| 50 | 50 | ||
| 51 | class IPurchaseEventManager final : public ServiceFramework<IPurchaseEventManager> { | ||
| 52 | public: | ||
| 53 | explicit IPurchaseEventManager(Core::System& system_) | ||
| 54 | : ServiceFramework{system_, "IPurchaseEventManager"} { | ||
| 55 | // clang-format off | ||
| 56 | static const FunctionInfo functions[] = { | ||
| 57 | {0, nullptr, "SetDefaultDeliveryTarget"}, | ||
| 58 | {1, nullptr, "SetDeliveryTarget"}, | ||
| 59 | {2, nullptr, "GetPurchasedEventReadableHandle"}, | ||
| 60 | {3, nullptr, "PopPurchasedProductInfo"}, | ||
| 61 | {4, nullptr, "PopPurchasedProductInfoWithUid"}, | ||
| 62 | }; | ||
| 63 | // clang-format on | ||
| 64 | |||
| 65 | RegisterHandlers(functions); | ||
| 66 | } | ||
| 67 | }; | ||
| 68 | |||
| 51 | AOC_U::AOC_U(Core::System& system_) | 69 | AOC_U::AOC_U(Core::System& system_) |
| 52 | : ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)} { | 70 | : ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)} { |
| 53 | // clang-format off | 71 | // clang-format off |
| @@ -62,8 +80,8 @@ AOC_U::AOC_U(Core::System& system_) | |||
| 62 | {7, &AOC_U::PrepareAddOnContent, "PrepareAddOnContent"}, | 80 | {7, &AOC_U::PrepareAddOnContent, "PrepareAddOnContent"}, |
| 63 | {8, &AOC_U::GetAddOnContentListChangedEvent, "GetAddOnContentListChangedEvent"}, | 81 | {8, &AOC_U::GetAddOnContentListChangedEvent, "GetAddOnContentListChangedEvent"}, |
| 64 | {9, nullptr, "GetAddOnContentLostErrorCode"}, | 82 | {9, nullptr, "GetAddOnContentLostErrorCode"}, |
| 65 | {100, nullptr, "CreateEcPurchasedEventManager"}, | 83 | {100, &AOC_U::CreateEcPurchasedEventManager, "CreateEcPurchasedEventManager"}, |
| 66 | {101, nullptr, "CreatePermanentEcPurchasedEventManager"}, | 84 | {101, &AOC_U::CreatePermanentEcPurchasedEventManager, "CreatePermanentEcPurchasedEventManager"}, |
| 67 | }; | 85 | }; |
| 68 | // clang-format on | 86 | // clang-format on |
| 69 | 87 | ||
| @@ -201,6 +219,22 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) { | |||
| 201 | rb.PushCopyObjects(aoc_change_event.readable); | 219 | rb.PushCopyObjects(aoc_change_event.readable); |
| 202 | } | 220 | } |
| 203 | 221 | ||
| 222 | void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { | ||
| 223 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | ||
| 224 | |||
| 225 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 226 | rb.Push(RESULT_SUCCESS); | ||
| 227 | rb.PushIpcInterface<IPurchaseEventManager>(system); | ||
| 228 | } | ||
| 229 | |||
| 230 | void AOC_U::CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { | ||
| 231 | LOG_WARNING(Service_AOC, "(STUBBED) called"); | ||
| 232 | |||
| 233 | IPC::ResponseBuilder rb{ctx, 2, 0, 1}; | ||
| 234 | rb.Push(RESULT_SUCCESS); | ||
| 235 | rb.PushIpcInterface<IPurchaseEventManager>(system); | ||
| 236 | } | ||
| 237 | |||
| 204 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { | 238 | void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { |
| 205 | std::make_shared<AOC_U>(system)->InstallAsService(service_manager); | 239 | std::make_shared<AOC_U>(system)->InstallAsService(service_manager); |
| 206 | } | 240 | } |
diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h index 7628f4568..26ee51be0 100644 --- a/src/core/hle/service/aoc/aoc_u.h +++ b/src/core/hle/service/aoc/aoc_u.h | |||
| @@ -27,6 +27,8 @@ private: | |||
| 27 | void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx); | 27 | void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx); |
| 28 | void PrepareAddOnContent(Kernel::HLERequestContext& ctx); | 28 | void PrepareAddOnContent(Kernel::HLERequestContext& ctx); |
| 29 | void GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx); | 29 | void GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx); |
| 30 | void CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx); | ||
| 31 | void CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx); | ||
| 30 | 32 | ||
| 31 | std::vector<u64> add_on_content; | 33 | std::vector<u64> add_on_content; |
| 32 | Kernel::EventPair aoc_change_event; | 34 | Kernel::EventPair aoc_change_event; |