summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/btdrv/btdrv.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/btdrv/btdrv.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/btdrv/btdrv.cpp')
-rw-r--r--src/core/hle/service/btdrv/btdrv.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp
index af3a5842d..dde276ff4 100644
--- a/src/core/hle/service/btdrv/btdrv.cpp
+++ b/src/core/hle/service/btdrv/btdrv.cpp
@@ -17,7 +17,8 @@ namespace Service::BtDrv {
class Bt final : public ServiceFramework<Bt> {
public:
- explicit Bt(Core::System& system_) : ServiceFramework{system_, "bt"} {
+ explicit Bt(Core::System& system_)
+ : ServiceFramework{system_, "bt"}, register_event{system.Kernel()} {
// clang-format off
static const FunctionInfo functions[] = {
{0, nullptr, "LeClientReadCharacteristic"},
@@ -34,9 +35,7 @@ public:
// clang-format on
RegisterHandlers(functions);
- auto& kernel = system.Kernel();
- register_event = Kernel::KEvent::Create(kernel, "BT:RegisterEvent");
- register_event->Initialize();
+ register_event.Initialize("BT:RegisterEvent");
}
private:
@@ -45,10 +44,10 @@ private:
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(register_event->GetReadableEvent());
+ rb.PushCopyObjects(register_event.GetReadableEvent());
}
- std::shared_ptr<Kernel::KEvent> register_event;
+ Kernel::KEvent register_event;
};
class BtDrv final : public ServiceFramework<BtDrv> {