summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/aoc/aoc_u.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-04 09:56:09 +0200
committerbunnei <bunneidev@gmail.com>2021-05-06 01:40:50 +0200
commitaddc0bf0379e075786048921bede6e089552a6db (patch)
tree7fa8819b52db29e1b354410441dd8f2438e2ed4a /src/core/hle/service/aoc/aoc_u.cpp
parenthle: kernel: Migrate KSharedMemory to KAutoObject. (diff)
downloadyuzu-addc0bf0379e075786048921bede6e089552a6db.tar
yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.gz
yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.bz2
yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.lz
yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.xz
yuzu-addc0bf0379e075786048921bede6e089552a6db.tar.zst
yuzu-addc0bf0379e075786048921bede6e089552a6db.zip
Diffstat (limited to 'src/core/hle/service/aoc/aoc_u.cpp')
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 75867e349..12a025610 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -16,7 +16,6 @@
#include "core/file_sys/patch_manager.h"
#include "core/file_sys/registered_cache.h"
#include "core/hle/ipc_helpers.h"
-#include "core/hle/kernel/k_event.h"
#include "core/hle/kernel/k_readable_event.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/process.h"
@@ -50,7 +49,7 @@ static std::vector<u64> AccumulateAOCTitleIDs(Core::System& system) {
class IPurchaseEventManager final : public ServiceFramework<IPurchaseEventManager> {
public:
explicit IPurchaseEventManager(Core::System& system_)
- : ServiceFramework{system_, "IPurchaseEventManager"} {
+ : ServiceFramework{system_, "IPurchaseEventManager"}, purchased_event{system.Kernel()} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &IPurchaseEventManager::SetDefaultDeliveryTarget, "SetDefaultDeliveryTarget"},
@@ -63,9 +62,7 @@ public:
RegisterHandlers(functions);
- purchased_event =
- Kernel::KEvent::Create(system.Kernel(), "IPurchaseEventManager:PurchasedEvent");
- purchased_event->Initialize();
+ purchased_event.Initialize("IPurchaseEventManager:PurchasedEvent");
}
private:
@@ -98,14 +95,15 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(purchased_event->GetReadableEvent());
+ rb.PushCopyObjects(purchased_event.GetReadableEvent());
}
- std::shared_ptr<Kernel::KEvent> purchased_event;
+ Kernel::KEvent purchased_event;
};
AOC_U::AOC_U(Core::System& system_)
- : ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)} {
+ : ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)},
+ aoc_change_event{system.Kernel()} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "CountAddOnContentByApplicationId"},
@@ -127,9 +125,7 @@ AOC_U::AOC_U(Core::System& system_)
RegisterHandlers(functions);
- auto& kernel = system.Kernel();
- aoc_change_event = Kernel::KEvent::Create(kernel, "GetAddOnContentListChanged:Event");
- aoc_change_event->Initialize();
+ aoc_change_event.Initialize("GetAddOnContentListChanged:Event");
}
AOC_U::~AOC_U() = default;
@@ -256,7 +252,7 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(aoc_change_event->GetReadableEvent());
+ rb.PushCopyObjects(aoc_change_event.GetReadableEvent());
}
void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) {