summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/bcat
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/bcat
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/bcat')
-rw-r--r--src/core/hle/service/bcat/backend/backend.cpp14
-rw-r--r--src/core/hle/service/bcat/backend/backend.h3
2 files changed, 8 insertions, 9 deletions
diff --git a/src/core/hle/service/bcat/backend/backend.cpp b/src/core/hle/service/bcat/backend/backend.cpp
index 7f301fdeb..932e70bfd 100644
--- a/src/core/hle/service/bcat/backend/backend.cpp
+++ b/src/core/hle/service/bcat/backend/backend.cpp
@@ -5,7 +5,6 @@
#include "common/hex_util.h"
#include "common/logging/log.h"
#include "core/core.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/lock.h"
@@ -14,14 +13,13 @@
namespace Service::BCAT {
ProgressServiceBackend::ProgressServiceBackend(Kernel::KernelCore& kernel,
- std::string_view event_name) {
- event = Kernel::KEvent::Create(kernel,
- "ProgressServiceBackend:UpdateEvent:" + std::string(event_name));
- event->Initialize();
+ std::string_view event_name)
+ : update_event{kernel} {
+ update_event.Initialize("ProgressServiceBackend:UpdateEvent:" + std::string(event_name));
}
std::shared_ptr<Kernel::KReadableEvent> ProgressServiceBackend::GetEvent() const {
- return SharedFrom(event->GetReadableEvent());
+ return update_event.GetReadableEvent();
}
DeliveryCacheProgressImpl& ProgressServiceBackend::GetImpl() {
@@ -89,9 +87,9 @@ void ProgressServiceBackend::FinishDownload(ResultCode result) {
void ProgressServiceBackend::SignalUpdate() const {
if (need_hle_lock) {
std::lock_guard lock(HLE::g_hle_lock);
- event->GetWritableEvent()->Signal();
+ update_event.GetWritableEvent()->Signal();
} else {
- event->GetWritableEvent()->Signal();
+ update_event.GetWritableEvent()->Signal();
}
}
diff --git a/src/core/hle/service/bcat/backend/backend.h b/src/core/hle/service/bcat/backend/backend.h
index db585b069..baa4d576a 100644
--- a/src/core/hle/service/bcat/backend/backend.h
+++ b/src/core/hle/service/bcat/backend/backend.h
@@ -11,6 +11,7 @@
#include "common/common_types.h"
#include "core/file_sys/vfs_types.h"
+#include "core/hle/kernel/k_event.h"
#include "core/hle/result.h"
namespace Core {
@@ -104,7 +105,7 @@ private:
void SignalUpdate() const;
DeliveryCacheProgressImpl impl{};
- std::shared_ptr<Kernel::KEvent> event;
+ Kernel::KEvent update_event;
bool need_hle_lock = false;
};