From e86a7e36912b6f3fc64a594338d3c1ac768e3bb8 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 29 Jan 2021 22:48:06 -0800 Subject: hle: kernel: Rename ReadableEvent to KReadableEvent. --- src/core/hle/service/aoc/aoc_u.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/service/aoc') diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 23e28565b..d63bb2a04 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -14,9 +14,9 @@ #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_readable_event.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/process.h" -#include "core/hle/kernel/readable_event.h" #include "core/hle/kernel/writable_event.h" #include "core/hle/service/aoc/aoc_u.h" #include "core/loader/loader.h" -- cgit v1.2.3 From 3f942c01f0d8c42837c49a164ed78f6410d62bda Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 29 Jan 2021 23:51:40 -0800 Subject: hle: kernel: Rename WritableEvent to KWritableEvent. --- src/core/hle/service/aoc/aoc_u.cpp | 6 +++--- src/core/hle/service/aoc/aoc_u.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src/core/hle/service/aoc') diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index d63bb2a04..334920c23 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -15,9 +15,9 @@ #include "core/file_sys/registered_cache.h" #include "core/hle/ipc_helpers.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/kernel/writable_event.h" #include "core/hle/service/aoc/aoc_u.h" #include "core/loader/loader.h" #include "core/settings.h" @@ -62,7 +62,7 @@ public: RegisterHandlers(functions); - purchased_event = Kernel::WritableEvent::CreateEventPair( + purchased_event = Kernel::KWritableEvent::CreateEventPair( system.Kernel(), "IPurchaseEventManager:PurchasedEvent"); } @@ -125,7 +125,7 @@ AOC_U::AOC_U(Core::System& system_) auto& kernel = system.Kernel(); aoc_change_event = - Kernel::WritableEvent::CreateEventPair(kernel, "GetAddOnContentListChanged:Event"); + Kernel::KWritableEvent::CreateEventPair(kernel, "GetAddOnContentListChanged:Event"); } AOC_U::~AOC_U() = default; diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h index 26ee51be0..594152de5 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 WritableEvent; +class KWritableEvent; } namespace Service::AOC { -- cgit v1.2.3 From ff3c7c068b926399513bf7328c22e224ab0b53d6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 31 Jan 2021 01:38:57 -0800 Subject: hle: kernel: Reimplement KReadableEvent and KWritableEvent. --- src/core/hle/service/aoc/aoc_u.cpp | 18 ++++++++++-------- src/core/hle/service/aoc/aoc_u.h | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'src/core/hle/service/aoc') 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 #include #include + #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 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 add_on_content; - Kernel::EventPair aoc_change_event; + std::shared_ptr aoc_change_event; }; /// Registers all AOC services with the specified service manager. -- cgit v1.2.3