diff options
| author | 2018-01-22 13:40:02 -0500 | |
|---|---|---|
| committer | 2018-01-22 13:40:02 -0500 | |
| commit | 42859461f3d6db8ea64facdf388d4791f713c7b1 (patch) | |
| tree | 379f83f27aa9718926733bf3e8c9e10cfd50b409 /src/core/hle/service/service.cpp | |
| parent | Merge pull request #132 from Subv/nvflinger (diff) | |
| download | yuzu-42859461f3d6db8ea64facdf388d4791f713c7b1.tar.gz yuzu-42859461f3d6db8ea64facdf388d4791f713c7b1.tar.xz yuzu-42859461f3d6db8ea64facdf388d4791f713c7b1.zip | |
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.
Diffstat (limited to 'src/core/hle/service/service.cpp')
| -rw-r--r-- | src/core/hle/service/service.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
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<ClientPort> port) { | |||
| 165 | 165 | ||
| 166 | /// Initialize ServiceManager | 166 | /// Initialize ServiceManager |
| 167 | void Init() { | 167 | void Init() { |
| 168 | // NVFlinger needs to be accessed by several services like Vi and AppletOE so we instantiate it | ||
| 169 | // here and pass it into the respective InstallInterfaces functions. | ||
| 170 | auto nv_flinger = std::make_shared<NVFlinger::NVFlinger>(); | ||
| 171 | |||
| 168 | SM::g_service_manager = std::make_shared<SM::ServiceManager>(); | 172 | SM::g_service_manager = std::make_shared<SM::ServiceManager>(); |
| 169 | SM::ServiceManager::InstallInterfaces(SM::g_service_manager); | 173 | SM::ServiceManager::InstallInterfaces(SM::g_service_manager); |
| 170 | 174 | ||
| @@ -180,7 +184,7 @@ void Init() { | |||
| 180 | PCTL::InstallInterfaces(*SM::g_service_manager); | 184 | PCTL::InstallInterfaces(*SM::g_service_manager); |
| 181 | Sockets::InstallInterfaces(*SM::g_service_manager); | 185 | Sockets::InstallInterfaces(*SM::g_service_manager); |
| 182 | Time::InstallInterfaces(*SM::g_service_manager); | 186 | Time::InstallInterfaces(*SM::g_service_manager); |
| 183 | VI::InstallInterfaces(*SM::g_service_manager); | 187 | VI::InstallInterfaces(*SM::g_service_manager, nv_flinger); |
| 184 | Set::InstallInterfaces(*SM::g_service_manager); | 188 | Set::InstallInterfaces(*SM::g_service_manager); |
| 185 | 189 | ||
| 186 | LOG_DEBUG(Service, "initialized OK"); | 190 | LOG_DEBUG(Service, "initialized OK"); |