mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-11-01 04:47:53 +00:00
IPurchaseEventManager: Implement GetPurchasedEventReadableHandle
- Used by Pokémon Café Mix - Used by DOOM: Eternal
This commit is contained in:
parent
a9cfe06aaf
commit
deff708cbe
1 changed files with 14 additions and 1 deletions
|
@ -56,13 +56,16 @@ public:
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, &IPurchaseEventManager::SetDefaultDeliveryTarget, "SetDefaultDeliveryTarget"},
|
{0, &IPurchaseEventManager::SetDefaultDeliveryTarget, "SetDefaultDeliveryTarget"},
|
||||||
{1, &IPurchaseEventManager::SetDeliveryTarget, "SetDeliveryTarget"},
|
{1, &IPurchaseEventManager::SetDeliveryTarget, "SetDeliveryTarget"},
|
||||||
{2, nullptr, "GetPurchasedEventReadableHandle"},
|
{2, &IPurchaseEventManager::GetPurchasedEventReadableHandle, "GetPurchasedEventReadableHandle"},
|
||||||
{3, nullptr, "PopPurchasedProductInfo"},
|
{3, nullptr, "PopPurchasedProductInfo"},
|
||||||
{4, nullptr, "PopPurchasedProductInfoWithUid"},
|
{4, nullptr, "PopPurchasedProductInfoWithUid"},
|
||||||
};
|
};
|
||||||
// clang-format on
|
// clang-format on
|
||||||
|
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
|
|
||||||
|
purchased_event = Kernel::WritableEvent::CreateEventPair(
|
||||||
|
system.Kernel(), "IPurchaseEventManager:PurchasedEvent");
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -89,6 +92,16 @@ private:
|
||||||
IPC::ResponseBuilder rb{ctx, 2};
|
IPC::ResponseBuilder rb{ctx, 2};
|
||||||
rb.Push(RESULT_SUCCESS);
|
rb.Push(RESULT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GetPurchasedEventReadableHandle(Kernel::HLERequestContext& ctx) {
|
||||||
|
LOG_WARNING(Service_AOC, "called");
|
||||||
|
|
||||||
|
IPC::ResponseBuilder rb{ctx, 2, 1};
|
||||||
|
rb.Push(RESULT_SUCCESS);
|
||||||
|
rb.PushCopyObjects(purchased_event.readable);
|
||||||
|
}
|
||||||
|
|
||||||
|
Kernel::EventPair purchased_event;
|
||||||
};
|
};
|
||||||
|
|
||||||
AOC_U::AOC_U(Core::System& system_)
|
AOC_U::AOC_U(Core::System& system_)
|
||||||
|
|
Loading…
Reference in a new issue