summaryrefslogtreecommitdiff
path: root/src/core/hle/service/btdrv
diff options
context:
space:
mode:
authorGravatar David Marcec2019-09-21 18:42:38 +1000
committerGravatar David Marcec2019-09-22 16:30:20 +1000
commitf2b61ff073f1ed766c837a2bc454812218f6746d (patch)
treea67d518817b7f9aa80048ccdd010210fa06bb23b /src/core/hle/service/btdrv
parentDeglobalize System: Aoc (diff)
downloadyuzu-f2b61ff073f1ed766c837a2bc454812218f6746d.tar.gz
yuzu-f2b61ff073f1ed766c837a2bc454812218f6746d.tar.xz
yuzu-f2b61ff073f1ed766c837a2bc454812218f6746d.zip
Deglobalize System: Btdrv
Diffstat (limited to 'src/core/hle/service/btdrv')
-rw-r--r--src/core/hle/service/btdrv/btdrv.cpp8
-rw-r--r--src/core/hle/service/btdrv/btdrv.h6
2 files changed, 9 insertions, 5 deletions
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cpp
index 3c7ca2c44..afce581e5 100644
--- a/src/core/hle/service/btdrv/btdrv.cpp
+++ b/src/core/hle/service/btdrv/btdrv.cpp
@@ -16,7 +16,7 @@ namespace Service::BtDrv {
16 16
17class Bt final : public ServiceFramework<Bt> { 17class Bt final : public ServiceFramework<Bt> {
18public: 18public:
19 explicit Bt() : ServiceFramework{"bt"} { 19 explicit Bt(Core::System& system) : ServiceFramework{"bt"} {
20 // clang-format off 20 // clang-format off
21 static const FunctionInfo functions[] = { 21 static const FunctionInfo functions[] = {
22 {0, nullptr, "LeClientReadCharacteristic"}, 22 {0, nullptr, "LeClientReadCharacteristic"},
@@ -33,7 +33,7 @@ public:
33 // clang-format on 33 // clang-format on
34 RegisterHandlers(functions); 34 RegisterHandlers(functions);
35 35
36 auto& kernel = Core::System::GetInstance().Kernel(); 36 auto& kernel = system.Kernel();
37 register_event = Kernel::WritableEvent::CreateEventPair( 37 register_event = Kernel::WritableEvent::CreateEventPair(
38 kernel, Kernel::ResetType::Automatic, "BT:RegisterEvent"); 38 kernel, Kernel::ResetType::Automatic, "BT:RegisterEvent");
39 } 39 }
@@ -163,9 +163,9 @@ public:
163 } 163 }
164}; 164};
165 165
166void InstallInterfaces(SM::ServiceManager& sm) { 166void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
167 std::make_shared<BtDrv>()->InstallAsService(sm); 167 std::make_shared<BtDrv>()->InstallAsService(sm);
168 std::make_shared<Bt>()->InstallAsService(sm); 168 std::make_shared<Bt>(system)->InstallAsService(sm);
169} 169}
170 170
171} // namespace Service::BtDrv 171} // namespace Service::BtDrv
diff --git a/src/core/hle/service/btdrv/btdrv.h b/src/core/hle/service/btdrv/btdrv.h
index 164e56f43..191410dbc 100644
--- a/src/core/hle/service/btdrv/btdrv.h
+++ b/src/core/hle/service/btdrv/btdrv.h
@@ -8,9 +8,13 @@ namespace Service::SM {
8class ServiceManager; 8class ServiceManager;
9} 9}
10 10
11namespace Core {
12class System;
13}
14
11namespace Service::BtDrv { 15namespace Service::BtDrv {
12 16
13/// Registers all BtDrv services with the specified service manager. 17/// Registers all BtDrv services with the specified service manager.
14void InstallInterfaces(SM::ServiceManager& sm); 18void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);
15 19
16} // namespace Service::BtDrv 20} // namespace Service::BtDrv