mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-11-26 09:15:42 +01:00
Deglobalize System: Btdrv
This commit is contained in:
parent
7da8e3f812
commit
f2b61ff073
@ -16,7 +16,7 @@ namespace Service::BtDrv {
|
|||||||
|
|
||||||
class Bt final : public ServiceFramework<Bt> {
|
class Bt final : public ServiceFramework<Bt> {
|
||||||
public:
|
public:
|
||||||
explicit Bt() : ServiceFramework{"bt"} {
|
explicit Bt(Core::System& system) : ServiceFramework{"bt"} {
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static const FunctionInfo functions[] = {
|
static const FunctionInfo functions[] = {
|
||||||
{0, nullptr, "LeClientReadCharacteristic"},
|
{0, nullptr, "LeClientReadCharacteristic"},
|
||||||
@ -33,7 +33,7 @@ public:
|
|||||||
// clang-format on
|
// clang-format on
|
||||||
RegisterHandlers(functions);
|
RegisterHandlers(functions);
|
||||||
|
|
||||||
auto& kernel = Core::System::GetInstance().Kernel();
|
auto& kernel = system.Kernel();
|
||||||
register_event = Kernel::WritableEvent::CreateEventPair(
|
register_event = Kernel::WritableEvent::CreateEventPair(
|
||||||
kernel, Kernel::ResetType::Automatic, "BT:RegisterEvent");
|
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<BtDrv>()->InstallAsService(sm);
|
||||||
std::make_shared<Bt>()->InstallAsService(sm);
|
std::make_shared<Bt>(system)->InstallAsService(sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Service::BtDrv
|
} // namespace Service::BtDrv
|
||||||
|
@ -8,9 +8,13 @@ namespace Service::SM {
|
|||||||
class ServiceManager;
|
class ServiceManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Core {
|
||||||
|
class System;
|
||||||
|
}
|
||||||
|
|
||||||
namespace Service::BtDrv {
|
namespace Service::BtDrv {
|
||||||
|
|
||||||
/// Registers all BtDrv services with the specified service manager.
|
/// 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
|
} // namespace Service::BtDrv
|
||||||
|
Loading…
Reference in New Issue
Block a user