summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/bcat
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/bcat')
-rw-r--r--src/core/hle/service/bcat/backend/backend.cpp8
-rw-r--r--src/core/hle/service/bcat/backend/backend.h4
-rw-r--r--src/core/hle/service/bcat/module.cpp10
3 files changed, 10 insertions, 12 deletions
diff --git a/src/core/hle/service/bcat/backend/backend.cpp b/src/core/hle/service/bcat/backend/backend.cpp
index 8def52b31..0e935bfa6 100644
--- a/src/core/hle/service/bcat/backend/backend.cpp
+++ b/src/core/hle/service/bcat/backend/backend.cpp
@@ -19,7 +19,7 @@ ProgressServiceBackend::ProgressServiceBackend(Kernel::KernelCore& kernel,
update_event.Initialize("ProgressServiceBackend:UpdateEvent:" + std::string(event_name));
}
-std::shared_ptr<Kernel::KReadableEvent> ProgressServiceBackend::GetEvent() const {
+Kernel::KReadableEvent& ProgressServiceBackend::GetEvent() {
return update_event.GetReadableEvent();
}
@@ -85,12 +85,12 @@ void ProgressServiceBackend::FinishDownload(ResultCode result) {
SignalUpdate();
}
-void ProgressServiceBackend::SignalUpdate() const {
+void ProgressServiceBackend::SignalUpdate() {
if (need_hle_lock) {
std::lock_guard lock(HLE::g_hle_lock);
- update_event.GetWritableEvent()->Signal();
+ update_event.GetWritableEvent().Signal();
} else {
- update_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 baa4d576a..f591a362a 100644
--- a/src/core/hle/service/bcat/backend/backend.h
+++ b/src/core/hle/service/bcat/backend/backend.h
@@ -99,10 +99,10 @@ public:
private:
explicit ProgressServiceBackend(Kernel::KernelCore& kernel, std::string_view event_name);
- std::shared_ptr<Kernel::KReadableEvent> GetEvent() const;
+ Kernel::KReadableEvent& GetEvent();
DeliveryCacheProgressImpl& GetImpl();
- void SignalUpdate() const;
+ void SignalUpdate();
DeliveryCacheProgressImpl impl{};
Kernel::KEvent update_event;
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp
index 8473b716b..05635a2a5 100644
--- a/src/core/hle/service/bcat/module.cpp
+++ b/src/core/hle/service/bcat/module.cpp
@@ -88,11 +88,9 @@ struct DeliveryCacheDirectoryEntry {
class IDeliveryCacheProgressService final : public ServiceFramework<IDeliveryCacheProgressService> {
public:
- explicit IDeliveryCacheProgressService(Core::System& system_,
- std::shared_ptr<Kernel::KReadableEvent> event_,
+ explicit IDeliveryCacheProgressService(Core::System& system_, Kernel::KReadableEvent& event_,
const DeliveryCacheProgressImpl& impl_)
- : ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{std::move(event_)},
- impl{impl_} {
+ : ServiceFramework{system_, "IDeliveryCacheProgressService"}, event{event_}, impl{impl_} {
// clang-format off
static const FunctionInfo functions[] = {
{0, &IDeliveryCacheProgressService::GetEvent, "GetEvent"},
@@ -109,7 +107,7 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(event.get());
+ rb.PushCopyObjects(event);
}
void GetImpl(Kernel::HLERequestContext& ctx) {
@@ -121,7 +119,7 @@ private:
rb.Push(RESULT_SUCCESS);
}
- std::shared_ptr<Kernel::KReadableEvent> event;
+ Kernel::KReadableEvent& event;
const DeliveryCacheProgressImpl& impl;
};