summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/btdrv/btdrv.cpp
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-11-27 00:34:07 +0100
committerZach Hilman <zachhilman@gmail.com>2018-11-29 14:45:41 +0100
commitff610103b58b3e0dd39fafb539a1cc0bc0fae577 (patch)
treecbd54b09f9270f6f1d92a2f45a5ccdb307569093 /src/core/hle/service/btdrv/btdrv.cpp
parenthle_ipc: Use event pair for SleepClientThread (diff)
downloadyuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar
yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.gz
yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.bz2
yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.lz
yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.xz
yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.tar.zst
yuzu-ff610103b58b3e0dd39fafb539a1cc0bc0fae577.zip
Diffstat (limited to 'src/core/hle/service/btdrv/btdrv.cpp')
-rw-r--r--src/core/hle/service/btdrv/btdrv.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp
index 2eadcdd05..04c78e81a 100644
--- a/src/core/hle/service/btdrv/btdrv.cpp
+++ b/src/core/hle/service/btdrv/btdrv.cpp
@@ -4,8 +4,10 @@
#include "common/logging/log.h"
#include "core/hle/ipc_helpers.h"
-#include "core/hle/kernel/event.h"
#include "core/hle/kernel/hle_ipc.h"
+#include "core/hle/kernel/kernel.h"
+#include "core/hle/kernel/readable_event.h"
+#include "core/hle/kernel/writable_event.h"
#include "core/hle/service/btdrv/btdrv.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
@@ -30,20 +32,22 @@ public:
};
// clang-format on
RegisterHandlers(functions);
+
+ auto& kernel = Core::System::GetInstance().Kernel();
+ register_event = Kernel::WritableEvent::CreateRegisteredEventPair(
+ kernel, Kernel::ResetType::OneShot, "BT:RegisterEvent");
}
private:
void RegisterEvent(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_BTM, "(STUBBED) called");
- auto& kernel = Core::System::GetInstance().Kernel();
- register_event =
- Kernel::Event::Create(kernel, Kernel::ResetType::OneShot, "BT:RegisterEvent");
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);
- rb.PushCopyObjects(register_event);
+ const auto& event{Core::System::GetInstance().Kernel().FindNamedEvent("BT:RegisterEvent")};
+ rb.PushCopyObjects(event->second);
}
- Kernel::SharedPtr<Kernel::Event> register_event;
+ Kernel::SharedPtr<Kernel::WritableEvent> register_event;
};
class BtDrv final : public ServiceFramework<BtDrv> {