From e2ad3e1fb0771a5280601dbcb9bafe9ebe323492 Mon Sep 17 00:00:00 2001 From: Zach Hilman Date: Fri, 28 Jun 2019 22:46:31 -0400 Subject: core: Keep instance of APM Controller --- src/core/core.cpp | 12 ++++++++++++ src/core/core.h | 8 ++++++++ 2 files changed, 20 insertions(+) diff --git a/src/core/core.cpp b/src/core/core.cpp index df26eb109..fa6fc357d 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -25,6 +25,7 @@ #include "core/hle/kernel/scheduler.h" #include "core/hle/kernel/thread.h" #include "core/hle/service/am/applets/applets.h" +#include "core/hle/service/apm/controller.h" #include "core/hle/service/glue/manager.h" #include "core/hle/service/service.h" #include "core/hle/service/sm/sm.h" @@ -304,6 +305,9 @@ struct System::Impl { /// Frontend applets Service::AM::Applets::AppletManager applet_manager; + /// APM (Performance) services + Service::APM::Controller apm_controller{core_timing}; + /// Glue services Service::Glue::ARPManager arp_manager; @@ -566,6 +570,14 @@ const Service::Glue::ARPManager& System::GetARPManager() const { return impl->arp_manager; } +Service::APM::Controller& System::GetAPMController() { + return impl->apm_controller; +} + +const Service::APM::Controller& System::GetAPMController() const { + return impl->apm_controller; +} + System::ResultStatus System::Init(Frontend::EmuWindow& emu_window) { return impl->Init(*this, emu_window); } diff --git a/src/core/core.h b/src/core/core.h index 70adb7af9..11e73278e 100644 --- a/src/core/core.h +++ b/src/core/core.h @@ -43,6 +43,10 @@ struct AppletFrontendSet; class AppletManager; } // namespace AM::Applets +namespace APM { +class Controller; +} + namespace Glue { class ARPManager; } @@ -296,6 +300,10 @@ public: const Service::Glue::ARPManager& GetARPManager() const; + Service::APM::Controller& GetAPMController(); + + const Service::APM::Controller& GetAPMController() const; + private: System(); -- cgit v1.2.3