diff options
| author | 2019-09-21 18:42:38 +1000 | |
|---|---|---|
| committer | 2019-09-22 16:30:20 +1000 | |
| commit | f2b61ff073f1ed766c837a2bc454812218f6746d (patch) | |
| tree | a67d518817b7f9aa80048ccdd010210fa06bb23b /src | |
| parent | Deglobalize System: Aoc (diff) | |
| download | yuzu-f2b61ff073f1ed766c837a2bc454812218f6746d.tar.gz yuzu-f2b61ff073f1ed766c837a2bc454812218f6746d.tar.xz yuzu-f2b61ff073f1ed766c837a2bc454812218f6746d.zip | |
Deglobalize System: Btdrv
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/service/btdrv/btdrv.h | 6 |
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 | ||
| 17 | class Bt final : public ServiceFramework<Bt> { | 17 | class Bt final : public ServiceFramework<Bt> { |
| 18 | public: | 18 | public: |
| 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 | ||
| 166 | void InstallInterfaces(SM::ServiceManager& sm) { | 166 | void 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 { | |||
| 8 | class ServiceManager; | 8 | class ServiceManager; |
| 9 | } | 9 | } |
| 10 | 10 | ||
| 11 | namespace Core { | ||
| 12 | class System; | ||
| 13 | } | ||
| 14 | |||
| 11 | namespace Service::BtDrv { | 15 | namespace Service::BtDrv { |
| 12 | 16 | ||
| 13 | /// Registers all BtDrv services with the specified service manager. | 17 | /// Registers all BtDrv services with the specified service manager. |
| 14 | void InstallInterfaces(SM::ServiceManager& sm); | 18 | void InstallInterfaces(SM::ServiceManager& sm, Core::System& system); |
| 15 | 19 | ||
| 16 | } // namespace Service::BtDrv | 20 | } // namespace Service::BtDrv |