From 182137a9a4b09c8188d2cbffa312550c5dc83641 Mon Sep 17 00:00:00 2001 From: Liam Date: Tue, 2 Jan 2024 18:29:03 -0500 Subject: am: migrate global state to per-applet state structure --- src/core/hle/service/am/self_controller.h | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) (limited to 'src/core/hle/service/am/self_controller.h') diff --git a/src/core/hle/service/am/self_controller.h b/src/core/hle/service/am/self_controller.h index f157bb826..6e6975264 100644 --- a/src/core/hle/service/am/self_controller.h +++ b/src/core/hle/service/am/self_controller.h @@ -8,9 +8,12 @@ namespace Service::AM { +struct Applet; + class ISelfController final : public ServiceFramework { public: - explicit ISelfController(Core::System& system_, Nvnflinger::Nvnflinger& nvnflinger_); + explicit ISelfController(Core::System& system_, std::shared_ptr applet_, + Nvnflinger::Nvnflinger& nvnflinger_); ~ISelfController() override; private: @@ -47,26 +50,8 @@ private: Result EnsureBufferSharingEnabled(Kernel::KProcess* process); - enum class ScreenshotPermission : u32 { - Inherit = 0, - Enable = 1, - Disable = 2, - }; - Nvnflinger::Nvnflinger& nvnflinger; - - KernelHelpers::ServiceContext service_context; - - Kernel::KEvent* launchable_event; - Kernel::KEvent* accumulated_suspended_tick_changed_event; - - u32 idle_time_detection_extension = 0; - u64 num_fatal_sections_entered = 0; - u64 system_shared_buffer_id = 0; - u64 system_shared_layer_id = 0; - bool is_auto_sleep_disabled = false; - bool buffer_sharing_enabled = false; - ScreenshotPermission screenshot_permission = ScreenshotPermission::Inherit; + const std::shared_ptr applet; }; } // namespace Service::AM -- cgit v1.2.3