VERY experimental Nintendo Switch 2 emulator
C++
Deglobalize System: Btdrv
David Marcecd50f79f6ed5b
diff --git a/src/core/hle/service/btdrv/btdrv.cpp b/src/core/hle/service/btdrv/btdrv.cppindex 3c7ca2c44a..afce581e56 100644--- a/src/core/hle/service/btdrv/btdrv.cpp+++ b/src/core/hle/service/btdrv/btdrv.cpp@@ -16,7 +16,7 @@ namespace Service::BtDrv {class Bt final : public ServiceFramework<Bt> {public:- explicit Bt() : ServiceFramework{"bt"} {+ explicit Bt(Core::System& system) : ServiceFramework{"bt"} {// clang-format offstatic const FunctionInfo functions[] = {{0, nullptr, "LeClientReadCharacteristic"},@@ -33,7 +33,7 @@ public:// clang-format onRegisterHandlers(functions);- auto& kernel = Core::System::GetInstance().Kernel();+ auto& kernel = system.Kernel();register_event = Kernel::WritableEvent::CreateEventPair(kernel, Kernel::ResetType::Automatic, "BT:RegisterEvent");}@@ -163,9 +163,9 @@ public:}};-void InstallInterfaces(SM::ServiceManager& sm) {+void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {std::make_shared<BtDrv>()->InstallAsService(sm);- std::make_shared<Bt>()->InstallAsService(sm);+ std::make_shared<Bt>(system)->InstallAsService(sm);}} // namespace Service::BtDrvdiff --git a/src/core/hle/service/btdrv/btdrv.h b/src/core/hle/service/btdrv/btdrv.hindex 164e56f436..191410dbc1 100644--- a/src/core/hle/service/btdrv/btdrv.h+++ b/src/core/hle/service/btdrv/btdrv.h@@ -8,9 +8,13 @@ namespace Service::SM {class ServiceManager;}+namespace Core {+class System;+}+namespace Service::BtDrv {/// Registers all BtDrv services with the specified service manager.-void InstallInterfaces(SM::ServiceManager& sm);+void InstallInterfaces(SM::ServiceManager& sm, Core::System& system);} // namespace Service::BtDrv