From 42859461f3d6db8ea64facdf388d4791f713c7b1 Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 22 Jan 2018 13:40:02 -0500 Subject: Services: Vi shouldn't be responsible for creating nvflinger. It is now created during Service initialization and passed to all the services that need it. --- src/core/hle/service/service.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/core/hle/service/service.cpp') diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 3f5ce56c6..403cce8e5 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -165,6 +165,10 @@ void AddNamedPort(std::string name, SharedPtr port) { /// Initialize ServiceManager void Init() { + // NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it + // here and pass it into the respective InstallInterfaces functions. + auto nv_flinger = std::make_shared(); + SM::g_service_manager = std::make_shared(); SM::ServiceManager::InstallInterfaces(SM::g_service_manager); @@ -180,7 +184,7 @@ void Init() { PCTL::InstallInterfaces(*SM::g_service_manager); Sockets::InstallInterfaces(*SM::g_service_manager); Time::InstallInterfaces(*SM::g_service_manager); - VI::InstallInterfaces(*SM::g_service_manager); + VI::InstallInterfaces(*SM::g_service_manager, nv_flinger); Set::InstallInterfaces(*SM::g_service_manager); LOG_DEBUG(Service, "initialized OK"); -- cgit v1.2.3