Przeglądaj źródła

apm: Add apm:am service
8.0.0+ identical version of apm

Zach Hilman 7 lat temu
rodzic
commit
9175b00e7d

+ 8 - 5
src/core/hle/service/apm/apm.cpp

@@ -2,7 +2,6 @@
 // Licensed under GPLv2 or any later version
 // Licensed under GPLv2 or any later version
 // Refer to the license.txt file included.
 // Refer to the license.txt file included.
 
 
-#include "common/logging/log.h"
 #include "core/hle/ipc_helpers.h"
 #include "core/hle/ipc_helpers.h"
 #include "core/hle/service/apm/apm.h"
 #include "core/hle/service/apm/apm.h"
 #include "core/hle/service/apm/interface.h"
 #include "core/hle/service/apm/interface.h"
@@ -12,11 +11,15 @@ namespace Service::APM {
 Module::Module() = default;
 Module::Module() = default;
 Module::~Module() = default;
 Module::~Module() = default;
 
 
-void InstallInterfaces(SM::ServiceManager& service_manager) {
+void InstallInterfaces(Core::System& system) {
     auto module_ = std::make_shared<Module>();
     auto module_ = std::make_shared<Module>();
-    std::make_shared<APM>(module_, "apm")->InstallAsService(service_manager);
-    std::make_shared<APM>(module_, "apm:p")->InstallAsService(service_manager);
-    std::make_shared<APM_Sys>()->InstallAsService(service_manager);
+    std::make_shared<APM>(module_, system.GetAPMController(), "apm")
+        ->InstallAsService(system.ServiceManager());
+    std::make_shared<APM>(module_, system.GetAPMController(), "apm:p")
+        ->InstallAsService(system.ServiceManager());
+    std::make_shared<APM>(module_, system.GetAPMController(), "apm:am")
+        ->InstallAsService(system.ServiceManager());
+    std::make_shared<APM_Sys>(system.GetAPMController())->InstallAsService(system.ServiceManager());
 }
 }
 
 
 } // namespace Service::APM
 } // namespace Service::APM

+ 1 - 6
src/core/hle/service/apm/apm.h

@@ -8,11 +8,6 @@
 
 
 namespace Service::APM {
 namespace Service::APM {
 
 
-enum class PerformanceMode : u8 {
-    Handheld = 0,
-    Docked = 1,
-};
-
 class Module final {
 class Module final {
 public:
 public:
     Module();
     Module();
@@ -20,6 +15,6 @@ public:
 };
 };
 
 
 /// Registers all AM services with the specified service manager.
 /// Registers all AM services with the specified service manager.
-void InstallInterfaces(SM::ServiceManager& service_manager);
+void InstallInterfaces(Core::System& system);
 
 
 } // namespace Service::APM
 } // namespace Service::APM