summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/aoc
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-01-31 10:38:57 +0100
committerbunnei <bunneidev@gmail.com>2021-02-05 23:03:32 +0100
commitff3c7c068b926399513bf7328c22e224ab0b53d6 (patch)
treec2a5d9f80ecf551659daa410cc384b1792eff31d /src/core/hle/service/aoc
parenthle: kernel: Implement KEvent. (diff)
downloadyuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar
yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.gz
yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.bz2
yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.lz
yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.xz
yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.tar.zst
yuzu-ff3c7c068b926399513bf7328c22e224ab0b53d6.zip
Diffstat (limited to 'src/core/hle/service/aoc')
-rw-r--r--src/core/hle/service/aoc/aoc_u.cpp18
-rw-r--r--src/core/hle/service/aoc/aoc_u.h4
2 files changed, 12 insertions, 10 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp
index 334920c23..8d657c0bf 100644
--- a/src/core/hle/service/aoc/aoc_u.cpp
+++ b/src/core/hle/service/aoc/aoc_u.cpp
@@ -5,6 +5,7 @@
#include <algorithm>
#include <numeric>
#include <vector>
+
#include "common/logging/log.h"
#include "core/core.h"
#include "core/file_sys/common_funcs.h"
@@ -14,8 +15,8 @@
#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/k_writable_event.h"
#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/process.h"
#include "core/hle/service/aoc/aoc_u.h"
@@ -62,8 +63,9 @@ public:
RegisterHandlers(functions);
- purchased_event = Kernel::KWritableEvent::CreateEventPair(
- system.Kernel(), "IPurchaseEventManager:PurchasedEvent");
+ purchased_event =
+ Kernel::KEvent::Create(system.Kernel(), "IPurchaseEventManager:PurchasedEvent");
+ purchased_event->Initialize();
}
private:
@@ -96,10 +98,10 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(purchased_event.readable);
+ rb.PushCopyObjects(purchased_event->GetReadableEvent());
}
- Kernel::EventPair purchased_event;
+ std::shared_ptr<Kernel::KEvent> purchased_event;
};
AOC_U::AOC_U(Core::System& system_)
@@ -124,8 +126,8 @@ AOC_U::AOC_U(Core::System& system_)
RegisterHandlers(functions);
auto& kernel = system.Kernel();
- aoc_change_event =
- Kernel::KWritableEvent::CreateEventPair(kernel, "GetAddOnContentListChanged:Event");
+ aoc_change_event = Kernel::KEvent::Create(kernel, "GetAddOnContentListChanged:Event");
+ aoc_change_event->Initialize();
}
AOC_U::~AOC_U() = default;
@@ -252,7 +254,7 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(aoc_change_event.readable);
+ rb.PushCopyObjects(aoc_change_event->GetReadableEvent());
}
void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) {
diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h
index 594152de5..1aa23529e 100644
--- a/src/core/hle/service/aoc/aoc_u.h
+++ b/src/core/hle/service/aoc/aoc_u.h
@@ -11,7 +11,7 @@ class System;
}
namespace Kernel {
-class KWritableEvent;
+class KEvent;
}
namespace Service::AOC {
@@ -31,7 +31,7 @@ private:
void CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx);
std::vector<u64> add_on_content;
- Kernel::EventPair aoc_change_event;
+ std::shared_ptr<Kernel::KEvent> aoc_change_event;
};
/// Registers all AOC services with the specified service manager.