summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/btdrv
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2018-11-16 15:42:17 +0100
committerDavid Marcec <dmarcecguzman@gmail.com>2018-11-16 15:42:17 +0100
commite8899e7027365bb0c617c63ce06019d4dfc78ab0 (patch)
tree64a306d8b1377d7b0a02423809c2bb6c1974eb38 /src/core/hle/service/btdrv
parentMerge pull request #1709 from ogniK5377/docked-mode-crash (diff)
downloadyuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.tar
yuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.tar.gz
yuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.tar.bz2
yuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.tar.lz
yuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.tar.xz
yuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.tar.zst
yuzu-e8899e7027365bb0c617c63ce06019d4dfc78ab0.zip
Diffstat (limited to 'src/core/hle/service/btdrv')
-rw-r--r--src/core/hle/service/btdrv/btdrv.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp
index d0a15cc4c..f3bde6d0d 100644
--- a/src/core/hle/service/btdrv/btdrv.cpp
+++ b/src/core/hle/service/btdrv/btdrv.cpp
@@ -2,12 +2,49 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
+#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/service/btdrv/btdrv.h"
#include "core/hle/service/service.h"
#include "core/hle/service/sm/sm.h"
namespace Service::BtDrv {
+class Bt final : public ServiceFramework<Bt> {
+public:
+ explicit Bt() : ServiceFramework{"bt"} {
+ // clang-format off
+ static const FunctionInfo functions[] = {
+ {0, nullptr, "Unknown0"},
+ {1, nullptr, "Unknown1"},
+ {2, nullptr, "Unknown2"},
+ {3, nullptr, "Unknown3"},
+ {4, nullptr, "Unknown4"},
+ {5, nullptr, "Unknown5"},
+ {6, nullptr, "Unknown6"},
+ {7, nullptr, "Unknown7"},
+ {8, nullptr, "Unknown8"},
+ {9, &Bt::RegisterEvent, "RegisterEvent"},
+ };
+ // clang-format on
+ RegisterHandlers(functions);
+ }
+
+private:
+ void RegisterEvent(Kernel::HLERequestContext& ctx) {
+ 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);
+ LOG_WARNING(Service_BTM, "(STUBBED) called");
+ }
+ Kernel::SharedPtr<Kernel::Event> register_event;
+};
+
class BtDrv final : public ServiceFramework<BtDrv> {
public:
explicit BtDrv() : ServiceFramework{"btdrv"} {
@@ -67,6 +104,7 @@ public:
void InstallInterfaces(SM::ServiceManager& sm) {
std::make_shared<BtDrv>()->InstallAsService(sm);
+ std::make_shared<Bt>()->InstallAsService(sm);
}
} // namespace Service::BtDrv