summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/am
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2024-02-14 17:39:42 +0100
committerLiam <byteslice@airmail.cc>2024-02-18 00:01:41 +0100
commitee8eccc5fa473f2ce210eb4e242e8eca40594db7 (patch)
tree5c38fc738e52be88eddd7733e0fdeb248ef4783f /src/core/hle/service/am
parentam: unify display layer management (diff)
downloadyuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.tar
yuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.tar.gz
yuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.tar.bz2
yuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.tar.lz
yuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.tar.xz
yuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.tar.zst
yuzu-ee8eccc5fa473f2ce210eb4e242e8eca40594db7.zip
Diffstat (limited to 'src/core/hle/service/am')
-rw-r--r--src/core/hle/service/am/am.cpp10
-rw-r--r--src/core/hle/service/am/am.h6
-rw-r--r--src/core/hle/service/am/display_layer_manager.cpp51
-rw-r--r--src/core/hle/service/am/display_layer_manager.h10
-rw-r--r--src/core/hle/service/am/service/all_system_applet_proxies_service.cpp13
-rw-r--r--src/core/hle/service/am/service/all_system_applet_proxies_service.h8
-rw-r--r--src/core/hle/service/am/service/application_proxy.cpp9
-rw-r--r--src/core/hle/service/am/service/application_proxy.h3
-rw-r--r--src/core/hle/service/am/service/application_proxy_service.cpp7
-rw-r--r--src/core/hle/service/am/service/application_proxy_service.h7
-rw-r--r--src/core/hle/service/am/service/library_applet_proxy.cpp10
-rw-r--r--src/core/hle/service/am/service/library_applet_proxy.h3
-rw-r--r--src/core/hle/service/am/service/self_controller.cpp8
-rw-r--r--src/core/hle/service/am/service/self_controller.h3
-rw-r--r--src/core/hle/service/am/service/system_applet_proxy.cpp10
-rw-r--r--src/core/hle/service/am/service/system_applet_proxy.h3
16 files changed, 72 insertions, 89 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index 9dc710ba9..8c4e14f08 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -8,13 +8,13 @@
namespace Service::AM {
-void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system) {
+void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
- server_manager->RegisterNamedService(
- "appletAE", std::make_shared<IAllSystemAppletProxiesService>(system, nvnflinger));
- server_manager->RegisterNamedService(
- "appletOE", std::make_shared<IApplicationProxyService>(system, nvnflinger));
+ server_manager->RegisterNamedService("appletAE",
+ std::make_shared<IAllSystemAppletProxiesService>(system));
+ server_manager->RegisterNamedService("appletOE",
+ std::make_shared<IApplicationProxyService>(system));
ServerManager::RunServer(std::move(server_manager));
}
diff --git a/src/core/hle/service/am/am.h b/src/core/hle/service/am/am.h
index 4a2d797bd..1afe253ae 100644
--- a/src/core/hle/service/am/am.h
+++ b/src/core/hle/service/am/am.h
@@ -7,12 +7,8 @@ namespace Core {
class System;
}
-namespace Service::Nvnflinger {
-class Nvnflinger;
-}
-
namespace Service::AM {
-void LoopProcess(Nvnflinger::Nvnflinger& nvnflinger, Core::System& system);
+void LoopProcess(Core::System& system);
} // namespace Service::AM
diff --git a/src/core/hle/service/am/display_layer_manager.cpp b/src/core/hle/service/am/display_layer_manager.cpp
index 50674c325..6cf3c369c 100644
--- a/src/core/hle/service/am/display_layer_manager.cpp
+++ b/src/core/hle/service/am/display_layer_manager.cpp
@@ -1,9 +1,12 @@
// SPDX-FileCopyrightText: Copyright 2024 yuzu Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
+#include "core/core.h"
#include "core/hle/service/am/display_layer_manager.h"
#include "core/hle/service/nvnflinger/fb_share_buffer_manager.h"
+#include "core/hle/service/nvnflinger/hos_binder_driver.h"
#include "core/hle/service/nvnflinger/nvnflinger.h"
+#include "core/hle/service/sm/sm.h"
#include "core/hle/service/vi/vi_results.h"
namespace Service::AM {
@@ -13,10 +16,12 @@ DisplayLayerManager::~DisplayLayerManager() {
this->Finalize();
}
-void DisplayLayerManager::Initialize(Nvnflinger::Nvnflinger* nvnflinger, Kernel::KProcess* process,
+void DisplayLayerManager::Initialize(Core::System& system, Kernel::KProcess* process,
AppletId applet_id, LibraryAppletMode mode) {
m_process = process;
- m_nvnflinger = nvnflinger;
+ m_surface_flinger = system.ServiceManager()
+ .GetService<Nvnflinger::IHOSBinderDriver>("dispdrv", true)
+ ->GetSurfaceFlinger();
m_system_shared_buffer_id = 0;
m_system_shared_layer_id = 0;
m_applet_id = applet_id;
@@ -26,36 +31,36 @@ void DisplayLayerManager::Initialize(Nvnflinger::Nvnflinger* nvnflinger, Kernel:
}
void DisplayLayerManager::Finalize() {
- if (!m_nvnflinger) {
+ if (!m_surface_flinger) {
return;
}
// Clean up managed layers.
for (const auto& layer : m_managed_display_layers) {
- m_nvnflinger->DestroyLayer(layer);
+ m_surface_flinger->DestroyLayer(layer);
}
for (const auto& layer : m_managed_display_recording_layers) {
- m_nvnflinger->DestroyLayer(layer);
+ m_surface_flinger->DestroyLayer(layer);
}
// Clean up shared layers.
if (m_buffer_sharing_enabled) {
- m_nvnflinger->GetSystemBufferManager().Finalize(m_process);
+ m_surface_flinger->GetSystemBufferManager().Finalize(m_process);
}
- m_nvnflinger = nullptr;
+ m_surface_flinger = nullptr;
}
Result DisplayLayerManager::CreateManagedDisplayLayer(u64* out_layer) {
- R_UNLESS(m_nvnflinger != nullptr, VI::ResultOperationFailed);
+ R_UNLESS(m_surface_flinger != nullptr, VI::ResultOperationFailed);
// TODO(Subv): Find out how AM determines the display to use, for now just
// create the layer in the Default display.
- const auto display_id = m_nvnflinger->OpenDisplay("Default");
- const auto layer_id = m_nvnflinger->CreateLayer(*display_id);
+ const auto display_id = m_surface_flinger->OpenDisplay("Default");
+ const auto layer_id = m_surface_flinger->CreateLayer(*display_id);
- m_nvnflinger->SetLayerVisibility(*layer_id, m_visible);
+ m_surface_flinger->SetLayerVisibility(*layer_id, m_visible);
m_managed_display_layers.emplace(*layer_id);
*out_layer = *layer_id;
@@ -65,7 +70,7 @@ Result DisplayLayerManager::CreateManagedDisplayLayer(u64* out_layer) {
Result DisplayLayerManager::CreateManagedDisplaySeparableLayer(u64* out_layer,
u64* out_recording_layer) {
- R_UNLESS(m_nvnflinger != nullptr, VI::ResultOperationFailed);
+ R_UNLESS(m_surface_flinger != nullptr, VI::ResultOperationFailed);
// TODO(Subv): Find out how AM determines the display to use, for now just
// create the layer in the Default display.
@@ -74,10 +79,10 @@ Result DisplayLayerManager::CreateManagedDisplaySeparableLayer(u64* out_layer,
// Outputting 1 layer id instead of the expected 2 has not been observed to cause any adverse
// side effects.
// TODO: Support multiple layers
- const auto display_id = m_nvnflinger->OpenDisplay("Default");
- const auto layer_id = m_nvnflinger->CreateLayer(*display_id);
+ const auto display_id = m_surface_flinger->OpenDisplay("Default");
+ const auto layer_id = m_surface_flinger->CreateLayer(*display_id);
- m_nvnflinger->SetLayerVisibility(*layer_id, m_visible);
+ m_surface_flinger->SetLayerVisibility(*layer_id, m_visible);
m_managed_display_layers.emplace(*layer_id);
*out_layer = *layer_id;
@@ -91,19 +96,19 @@ Result DisplayLayerManager::IsSystemBufferSharingEnabled() {
R_SUCCEED_IF(m_buffer_sharing_enabled);
// Ensure we can access shared layers.
- R_UNLESS(m_nvnflinger != nullptr, VI::ResultOperationFailed);
+ R_UNLESS(m_surface_flinger != nullptr, VI::ResultOperationFailed);
R_UNLESS(m_applet_id != AppletId::Application, VI::ResultPermissionDenied);
// Create the shared layer.
const auto blend =
m_blending_enabled ? Nvnflinger::LayerBlending::Coverage : Nvnflinger::LayerBlending::None;
- const auto display_id = m_nvnflinger->OpenDisplay("Default").value();
- R_TRY(m_nvnflinger->GetSystemBufferManager().Initialize(
+ const auto display_id = m_surface_flinger->OpenDisplay("Default").value();
+ R_TRY(m_surface_flinger->GetSystemBufferManager().Initialize(
m_process, &m_system_shared_buffer_id, &m_system_shared_layer_id, display_id, blend));
// We succeeded, so set up remaining state.
m_buffer_sharing_enabled = true;
- m_nvnflinger->SetLayerVisibility(m_system_shared_layer_id, m_visible);
+ m_surface_flinger->SetLayerVisibility(m_system_shared_layer_id, m_visible);
R_SUCCEED();
}
@@ -124,13 +129,13 @@ void DisplayLayerManager::SetWindowVisibility(bool visible) {
m_visible = visible;
- if (m_nvnflinger) {
+ if (m_surface_flinger) {
if (m_system_shared_layer_id) {
- m_nvnflinger->SetLayerVisibility(m_system_shared_layer_id, m_visible);
+ m_surface_flinger->SetLayerVisibility(m_system_shared_layer_id, m_visible);
}
for (const auto layer_id : m_managed_display_layers) {
- m_nvnflinger->SetLayerVisibility(layer_id, m_visible);
+ m_surface_flinger->SetLayerVisibility(layer_id, m_visible);
}
}
}
@@ -142,7 +147,7 @@ bool DisplayLayerManager::GetWindowVisibility() const {
Result DisplayLayerManager::WriteAppletCaptureBuffer(bool* out_was_written,
s32* out_fbshare_layer_index) {
R_UNLESS(m_buffer_sharing_enabled, VI::ResultPermissionDenied);
- R_RETURN(m_nvnflinger->GetSystemBufferManager().WriteAppletCaptureBuffer(
+ R_RETURN(m_surface_flinger->GetSystemBufferManager().WriteAppletCaptureBuffer(
out_was_written, out_fbshare_layer_index));
}
diff --git a/src/core/hle/service/am/display_layer_manager.h b/src/core/hle/service/am/display_layer_manager.h
index 45023a88c..92ab9399f 100644
--- a/src/core/hle/service/am/display_layer_manager.h
+++ b/src/core/hle/service/am/display_layer_manager.h
@@ -9,6 +9,10 @@
#include "core/hle/result.h"
#include "core/hle/service/am/am_types.h"
+namespace Core {
+class System;
+}
+
namespace Kernel {
class KProcess;
}
@@ -24,8 +28,8 @@ public:
explicit DisplayLayerManager();
~DisplayLayerManager();
- void Initialize(Nvnflinger::Nvnflinger* nvnflinger, Kernel::KProcess* process,
- AppletId applet_id, LibraryAppletMode mode);
+ void Initialize(Core::System& system, Kernel::KProcess* process, AppletId applet_id,
+ LibraryAppletMode mode);
void Finalize();
Result CreateManagedDisplayLayer(u64* out_layer);
@@ -42,7 +46,7 @@ public:
private:
Kernel::KProcess* m_process{};
- Nvnflinger::Nvnflinger* m_nvnflinger{};
+ std::shared_ptr<Nvnflinger::Nvnflinger> m_surface_flinger{};
std::set<u64> m_managed_display_layers{};
std::set<u64> m_managed_display_recording_layers{};
u64 m_system_shared_buffer_id{};
diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp
index eebd90ba2..21747783a 100644
--- a/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp
+++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.cpp
@@ -10,9 +10,8 @@
namespace Service::AM {
-IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& system_,
- Nvnflinger::Nvnflinger& nvnflinger)
- : ServiceFramework{system_, "appletAE"}, m_nvnflinger{nvnflinger} {
+IAllSystemAppletProxiesService::IAllSystemAppletProxiesService(Core::System& system_)
+ : ServiceFramework{system_, "appletAE"} {
// clang-format off
static const FunctionInfo functions[] = {
{100, D<&IAllSystemAppletProxiesService::OpenSystemAppletProxy>, "OpenSystemAppletProxy"},
@@ -37,8 +36,8 @@ Result IAllSystemAppletProxiesService::OpenSystemAppletProxy(
LOG_DEBUG(Service_AM, "called");
if (const auto applet = this->GetAppletFromProcessId(pid); applet) {
- *out_system_applet_proxy = std::make_shared<ISystemAppletProxy>(
- system, applet, process_handle.Get(), m_nvnflinger);
+ *out_system_applet_proxy =
+ std::make_shared<ISystemAppletProxy>(system, applet, process_handle.Get());
R_SUCCEED();
} else {
UNIMPLEMENTED();
@@ -53,8 +52,8 @@ Result IAllSystemAppletProxiesService::OpenLibraryAppletProxy(
LOG_DEBUG(Service_AM, "called");
if (const auto applet = this->GetAppletFromProcessId(pid); applet) {
- *out_library_applet_proxy = std::make_shared<ILibraryAppletProxy>(
- system, applet, process_handle.Get(), m_nvnflinger);
+ *out_library_applet_proxy =
+ std::make_shared<ILibraryAppletProxy>(system, applet, process_handle.Get());
R_SUCCEED();
} else {
UNIMPLEMENTED();
diff --git a/src/core/hle/service/am/service/all_system_applet_proxies_service.h b/src/core/hle/service/am/service/all_system_applet_proxies_service.h
index 38b1ca2ea..0e2dcb86d 100644
--- a/src/core/hle/service/am/service/all_system_applet_proxies_service.h
+++ b/src/core/hle/service/am/service/all_system_applet_proxies_service.h
@@ -8,10 +8,6 @@
namespace Service {
-namespace Nvnflinger {
-class Nvnflinger;
-}
-
namespace AM {
struct Applet;
@@ -22,8 +18,7 @@ class ISystemAppletProxy;
class IAllSystemAppletProxiesService final
: public ServiceFramework<IAllSystemAppletProxiesService> {
public:
- explicit IAllSystemAppletProxiesService(Core::System& system_,
- Nvnflinger::Nvnflinger& nvnflinger);
+ explicit IAllSystemAppletProxiesService(Core::System& system_);
~IAllSystemAppletProxiesService() override;
private:
@@ -40,7 +35,6 @@ private:
private:
std::shared_ptr<Applet> GetAppletFromProcessId(ProcessId pid);
- Nvnflinger::Nvnflinger& m_nvnflinger;
};
} // namespace AM
diff --git a/src/core/hle/service/am/service/application_proxy.cpp b/src/core/hle/service/am/service/application_proxy.cpp
index 776f4552b..19d6a3b89 100644
--- a/src/core/hle/service/am/service/application_proxy.cpp
+++ b/src/core/hle/service/am/service/application_proxy.cpp
@@ -17,9 +17,9 @@
namespace Service::AM {
IApplicationProxy::IApplicationProxy(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger)
- : ServiceFramework{system_, "IApplicationProxy"},
- m_nvnflinger{nvnflinger}, m_process{process}, m_applet{std::move(applet)} {
+ Kernel::KProcess* process)
+ : ServiceFramework{system_, "IApplicationProxy"}, m_process{process}, m_applet{
+ std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&IApplicationProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
@@ -77,8 +77,7 @@ Result IApplicationProxy::GetWindowController(
Result IApplicationProxy::GetSelfController(
Out<SharedPointer<ISelfController>> out_self_controller) {
LOG_DEBUG(Service_AM, "called");
- *out_self_controller =
- std::make_shared<ISelfController>(system, m_applet, m_process, m_nvnflinger);
+ *out_self_controller = std::make_shared<ISelfController>(system, m_applet, m_process);
R_SUCCEED();
}
diff --git a/src/core/hle/service/am/service/application_proxy.h b/src/core/hle/service/am/service/application_proxy.h
index 1ebc593ba..6da350df7 100644
--- a/src/core/hle/service/am/service/application_proxy.h
+++ b/src/core/hle/service/am/service/application_proxy.h
@@ -22,7 +22,7 @@ class IWindowController;
class IApplicationProxy final : public ServiceFramework<IApplicationProxy> {
public:
explicit IApplicationProxy(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger);
+ Kernel::KProcess* process);
~IApplicationProxy();
private:
@@ -40,7 +40,6 @@ private:
Out<SharedPointer<IApplicationFunctions>> out_application_functions);
private:
- Nvnflinger::Nvnflinger& m_nvnflinger;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
};
diff --git a/src/core/hle/service/am/service/application_proxy_service.cpp b/src/core/hle/service/am/service/application_proxy_service.cpp
index 36d4478df..fd66e77b9 100644
--- a/src/core/hle/service/am/service/application_proxy_service.cpp
+++ b/src/core/hle/service/am/service/application_proxy_service.cpp
@@ -10,9 +10,8 @@
namespace Service::AM {
-IApplicationProxyService::IApplicationProxyService(Core::System& system_,
- Nvnflinger::Nvnflinger& nvnflinger)
- : ServiceFramework{system_, "appletOE"}, m_nvnflinger{nvnflinger} {
+IApplicationProxyService::IApplicationProxyService(Core::System& system_)
+ : ServiceFramework{system_, "appletOE"} {
static const FunctionInfo functions[] = {
{0, D<&IApplicationProxyService::OpenApplicationProxy>, "OpenApplicationProxy"},
};
@@ -28,7 +27,7 @@ Result IApplicationProxyService::OpenApplicationProxy(
if (const auto applet = this->GetAppletFromProcessId(pid)) {
*out_application_proxy =
- std::make_shared<IApplicationProxy>(system, applet, process_handle.Get(), m_nvnflinger);
+ std::make_shared<IApplicationProxy>(system, applet, process_handle.Get());
R_SUCCEED();
} else {
UNIMPLEMENTED();
diff --git a/src/core/hle/service/am/service/application_proxy_service.h b/src/core/hle/service/am/service/application_proxy_service.h
index 1c1d32d0b..8efafa31a 100644
--- a/src/core/hle/service/am/service/application_proxy_service.h
+++ b/src/core/hle/service/am/service/application_proxy_service.h
@@ -8,10 +8,6 @@
namespace Service {
-namespace Nvnflinger {
-class Nvnflinger;
-}
-
namespace AM {
struct Applet;
@@ -19,7 +15,7 @@ class IApplicationProxy;
class IApplicationProxyService final : public ServiceFramework<IApplicationProxyService> {
public:
- explicit IApplicationProxyService(Core::System& system_, Nvnflinger::Nvnflinger& nvnflinger);
+ explicit IApplicationProxyService(Core::System& system_);
~IApplicationProxyService() override;
private:
@@ -28,7 +24,6 @@ private:
private:
std::shared_ptr<Applet> GetAppletFromProcessId(ProcessId pid);
- Nvnflinger::Nvnflinger& m_nvnflinger;
};
} // namespace AM
diff --git a/src/core/hle/service/am/service/library_applet_proxy.cpp b/src/core/hle/service/am/service/library_applet_proxy.cpp
index bcb44a71c..58e709347 100644
--- a/src/core/hle/service/am/service/library_applet_proxy.cpp
+++ b/src/core/hle/service/am/service/library_applet_proxy.cpp
@@ -19,10 +19,9 @@
namespace Service::AM {
ILibraryAppletProxy::ILibraryAppletProxy(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process,
- Nvnflinger::Nvnflinger& nvnflinger)
- : ServiceFramework{system_, "ILibraryAppletProxy"},
- m_nvnflinger{nvnflinger}, m_process{process}, m_applet{std::move(applet)} {
+ Kernel::KProcess* process)
+ : ServiceFramework{system_, "ILibraryAppletProxy"}, m_process{process}, m_applet{
+ std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ILibraryAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
@@ -83,8 +82,7 @@ Result ILibraryAppletProxy::GetWindowController(
Result ILibraryAppletProxy::GetSelfController(
Out<SharedPointer<ISelfController>> out_self_controller) {
LOG_DEBUG(Service_AM, "called");
- *out_self_controller =
- std::make_shared<ISelfController>(system, m_applet, m_process, m_nvnflinger);
+ *out_self_controller = std::make_shared<ISelfController>(system, m_applet, m_process);
R_SUCCEED();
}
diff --git a/src/core/hle/service/am/service/library_applet_proxy.h b/src/core/hle/service/am/service/library_applet_proxy.h
index 23e64e295..7d0714b85 100644
--- a/src/core/hle/service/am/service/library_applet_proxy.h
+++ b/src/core/hle/service/am/service/library_applet_proxy.h
@@ -25,7 +25,7 @@ class IWindowController;
class ILibraryAppletProxy final : public ServiceFramework<ILibraryAppletProxy> {
public:
explicit ILibraryAppletProxy(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger);
+ Kernel::KProcess* process);
~ILibraryAppletProxy();
private:
@@ -47,7 +47,6 @@ private:
Result GetGlobalStateController(
Out<SharedPointer<IGlobalStateController>> out_global_state_controller);
- Nvnflinger::Nvnflinger& m_nvnflinger;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
};
diff --git a/src/core/hle/service/am/service/self_controller.cpp b/src/core/hle/service/am/service/self_controller.cpp
index 6b77e423a..06314407c 100644
--- a/src/core/hle/service/am/service/self_controller.cpp
+++ b/src/core/hle/service/am/service/self_controller.cpp
@@ -15,9 +15,9 @@
namespace Service::AM {
ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger)
- : ServiceFramework{system_, "ISelfController"}, m_nvnflinger{nvnflinger}, m_process{process},
- m_applet{std::move(applet)} {
+ Kernel::KProcess* process)
+ : ServiceFramework{system_, "ISelfController"}, m_process{process}, m_applet{
+ std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ISelfController::Exit>, "Exit"},
@@ -74,7 +74,7 @@ ISelfController::ISelfController(Core::System& system_, std::shared_ptr<Applet>
RegisterHandlers(functions);
std::scoped_lock lk{m_applet->lock};
- m_applet->display_layer_manager.Initialize(&m_nvnflinger, m_process, m_applet->applet_id,
+ m_applet->display_layer_manager.Initialize(system, m_process, m_applet->applet_id,
m_applet->library_applet_mode);
}
diff --git a/src/core/hle/service/am/service/self_controller.h b/src/core/hle/service/am/service/self_controller.h
index 01fa381a3..eca083cfe 100644
--- a/src/core/hle/service/am/service/self_controller.h
+++ b/src/core/hle/service/am/service/self_controller.h
@@ -23,7 +23,7 @@ struct Applet;
class ISelfController final : public ServiceFramework<ISelfController> {
public:
explicit ISelfController(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger);
+ Kernel::KProcess* process);
~ISelfController() override;
private:
@@ -64,7 +64,6 @@ private:
Result SaveCurrentScreenshot(Capture::AlbumReportOption album_report_option);
Result SetRecordVolumeMuted(bool muted);
- Nvnflinger::Nvnflinger& m_nvnflinger;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
};
diff --git a/src/core/hle/service/am/service/system_applet_proxy.cpp b/src/core/hle/service/am/service/system_applet_proxy.cpp
index 5ec509d2e..d1871ef9b 100644
--- a/src/core/hle/service/am/service/system_applet_proxy.cpp
+++ b/src/core/hle/service/am/service/system_applet_proxy.cpp
@@ -19,10 +19,9 @@
namespace Service::AM {
ISystemAppletProxy::ISystemAppletProxy(Core::System& system_, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process,
- Nvnflinger::Nvnflinger& nvnflinger)
- : ServiceFramework{system_, "ISystemAppletProxy"},
- m_nvnflinger{nvnflinger}, m_process{process}, m_applet{std::move(applet)} {
+ Kernel::KProcess* process)
+ : ServiceFramework{system_, "ISystemAppletProxy"}, m_process{process}, m_applet{
+ std::move(applet)} {
// clang-format off
static const FunctionInfo functions[] = {
{0, D<&ISystemAppletProxy::GetCommonStateGetter>, "GetCommonStateGetter"},
@@ -83,8 +82,7 @@ Result ISystemAppletProxy::GetWindowController(
Result ISystemAppletProxy::GetSelfController(
Out<SharedPointer<ISelfController>> out_self_controller) {
LOG_DEBUG(Service_AM, "called");
- *out_self_controller =
- std::make_shared<ISelfController>(system, m_applet, m_process, m_nvnflinger);
+ *out_self_controller = std::make_shared<ISelfController>(system, m_applet, m_process);
R_SUCCEED();
}
diff --git a/src/core/hle/service/am/service/system_applet_proxy.h b/src/core/hle/service/am/service/system_applet_proxy.h
index 3d5040315..67cd50e03 100644
--- a/src/core/hle/service/am/service/system_applet_proxy.h
+++ b/src/core/hle/service/am/service/system_applet_proxy.h
@@ -25,7 +25,7 @@ class IWindowController;
class ISystemAppletProxy final : public ServiceFramework<ISystemAppletProxy> {
public:
explicit ISystemAppletProxy(Core::System& system, std::shared_ptr<Applet> applet,
- Kernel::KProcess* process, Nvnflinger::Nvnflinger& nvnflinger);
+ Kernel::KProcess* process);
~ISystemAppletProxy();
private:
@@ -46,7 +46,6 @@ private:
Result GetGlobalStateController(
Out<SharedPointer<IGlobalStateController>> out_global_state_controller);
- Nvnflinger::Nvnflinger& m_nvnflinger;
Kernel::KProcess* const m_process;
const std::shared_ptr<Applet> m_applet;
};