mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-16 06:17:59 +00: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:
parent
a20ffebc80
commit
346271b80b
222 changed files with 1221 additions and 907 deletions
|
@ -12,7 +12,7 @@ namespace Service::PCV {
|
|||
|
||||
class PCV final : public ServiceFramework<PCV> {
|
||||
public:
|
||||
explicit PCV() : ServiceFramework{"pcv"} {
|
||||
explicit PCV(Core::System& system_) : ServiceFramework{system_, "pcv"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "SetPowerEnabled"},
|
||||
|
@ -54,7 +54,7 @@ public:
|
|||
|
||||
class PCV_ARB final : public ServiceFramework<PCV_ARB> {
|
||||
public:
|
||||
explicit PCV_ARB() : ServiceFramework{"pcv:arb"} {
|
||||
explicit PCV_ARB(Core::System& system_) : ServiceFramework{system_, "pcv:arb"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "ReleaseControl"},
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
class PCV_IMM final : public ServiceFramework<PCV_IMM> {
|
||||
public:
|
||||
explicit PCV_IMM() : ServiceFramework{"pcv:imm"} {
|
||||
explicit PCV_IMM(Core::System& system_) : ServiceFramework{system_, "pcv:imm"} {
|
||||
// clang-format off
|
||||
static const FunctionInfo functions[] = {
|
||||
{0, nullptr, "SetClockRate"},
|
||||
|
@ -78,10 +78,10 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
void InstallInterfaces(SM::ServiceManager& sm) {
|
||||
std::make_shared<PCV>()->InstallAsService(sm);
|
||||
std::make_shared<PCV_ARB>()->InstallAsService(sm);
|
||||
std::make_shared<PCV_IMM>()->InstallAsService(sm);
|
||||
void InstallInterfaces(SM::ServiceManager& sm, Core::System& system) {
|
||||
std::make_shared<PCV>(system)->InstallAsService(sm);
|
||||
std::make_shared<PCV_ARB>(system)->InstallAsService(sm);
|
||||
std::make_shared<PCV_IMM>(system)->InstallAsService(sm);
|
||||
}
|
||||
|
||||
} // namespace Service::PCV
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue