mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 18:27:59 -05:00
service: Eliminate usages of the global system instance
Completely removes all usages of the global system instance within the services code by passing in the using system instance to the services.
This commit is contained in:
@ -17,7 +17,7 @@ namespace Service::BtDrv {
|
||||
|
||||
class Bt final : public ServiceFramework<Bt> {
|
||||
public:
|
||||
explicit Bt(Core::System& system) : ServiceFramework{"bt"} {
|
||||
explicit Bt(Core::System& system_) : ServiceFramework{system_, "bt"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "LeClientReadCharacteristic"},
|
||||
@ -52,7 +52,7 @@ private:
|
||||
|
||||
class BtDrv final : public ServiceFramework<BtDrv> {
|
||||
public:
|
||||
explicit BtDrv() : ServiceFramework{"btdrv"} {
|
||||
explicit BtDrv(Core::System& system_) : ServiceFramework{system_, "btdrv"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "InitializeBluetoothDriver"},
|
||||
@ -166,7 +166,7 @@ public:
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
|
||||
std::make_shared<BtDrv>()->InstallAsService(sm);
|
||||
std::make_shared<BtDrv>(system)->InstallAsService(sm);
|
||||
std::make_shared<Bt>(system)->InstallAsService(sm);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user