diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-03-01 16:38:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 16:38:20 +0100 |
commit | 97f7a560f3905a1dd6a4e5a0a308ea752004bf08 (patch) | |
tree | e60a69f96d16d051220b66e90906a7abeacf1064 /src/core/hle/service/nvdrv/nvdrv.cpp | |
parent | Merge pull request #9879 from zhaobot/tx-update-20230301024940 (diff) | |
parent | sm:: fix lingering session initialization issues (diff) | |
download | yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.gz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.bz2 yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.lz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.xz yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.tar.zst yuzu-97f7a560f3905a1dd6a4e5a0a308ea752004bf08.zip |
Diffstat (limited to 'src/core/hle/service/nvdrv/nvdrv.cpp')
-rw-r--r-- | src/core/hle/service/nvdrv/nvdrv.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cpp index 52d27e755..a70ea9385 100644 --- a/src/core/hle/service/nvdrv/nvdrv.cpp +++ b/src/core/hle/service/nvdrv/nvdrv.cpp @@ -24,6 +24,7 @@ #include "core/hle/service/nvdrv/nvdrv_interface.h" #include "core/hle/service/nvdrv/nvmemp.h" #include "core/hle/service/nvflinger/nvflinger.h" +#include "core/hle/service/server_manager.h" #include "video_core/gpu.h" namespace Service::Nvidia { @@ -41,15 +42,19 @@ void EventInterface::FreeEvent(Kernel::KEvent* event) { module.service_context.CloseEvent(event); } -void InstallInterfaces(SM::ServiceManager& service_manager, NVFlinger::NVFlinger& nvflinger, - Core::System& system) { - auto module_ = std::make_shared<Module>(system); - std::make_shared<NVDRV>(system, module_, "nvdrv")->InstallAsService(service_manager); - std::make_shared<NVDRV>(system, module_, "nvdrv:a")->InstallAsService(service_manager); - std::make_shared<NVDRV>(system, module_, "nvdrv:s")->InstallAsService(service_manager); - std::make_shared<NVDRV>(system, module_, "nvdrv:t")->InstallAsService(service_manager); - std::make_shared<NVMEMP>(system)->InstallAsService(service_manager); - nvflinger.SetNVDrvInstance(module_); +void LoopProcess(NVFlinger::NVFlinger& nvflinger, Core::System& system) { + auto server_manager = std::make_unique<ServerManager>(system); + auto module = std::make_shared<Module>(system); + server_manager->RegisterNamedService("nvdrv", std::make_shared<NVDRV>(system, module, "nvdrv")); + server_manager->RegisterNamedService("nvdrv:a", + std::make_shared<NVDRV>(system, module, "nvdrv:a")); + server_manager->RegisterNamedService("nvdrv:s", + std::make_shared<NVDRV>(system, module, "nvdrv:s")); + server_manager->RegisterNamedService("nvdrv:t", + std::make_shared<NVDRV>(system, module, "nvdrv:t")); + server_manager->RegisterNamedService("nvmemp", std::make_shared<NVMEMP>(system)); + nvflinger.SetNVDrvInstance(module); + ServerManager::RunServer(std::move(server_manager)); } Module::Module(Core::System& system) |