VERY experimental Nintendo Switch 2 emulator
C++
partial revert a41a98028a (#4292)
PavelBARABANOV4eb8dd1458fb
diff --git a/src/core/hle/service/nvdrv/nvdrv.cpp b/src/core/hle/service/nvdrv/nvdrv.cppindex cc006bd975..b252a2efa5 100644--- a/src/core/hle/service/nvdrv/nvdrv.cpp+++ b/src/core/hle/service/nvdrv/nvdrv.cpp@@ -105,7 +105,12 @@ void LoopProcess(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"));++ const auto NvdrvInterfaceFactoryForApplets = [&, module] {+ return std::make_shared<NVDRV>(system, module, "nvdrv:a");+ };++ server_manager->RegisterNamedService("nvdrv:a", NvdrvInterfaceFactoryForApplets);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));diff --git a/src/core/hle/service/ro/ro.cpp b/src/core/hle/service/ro/ro.cppindex f0561b19cc..922fc10440 100644--- a/src/core/hle/service/ro/ro.cpp+++ b/src/core/hle/service/ro/ro.cpp@@ -588,7 +588,12 @@ void LoopProcess(Core::System& system) {auto server_manager = std::make_unique<ServerManager>(system);auto ro = std::make_shared<RoContext>();- server_manager->RegisterNamedService("ldr:ro", std::make_shared<RoInterface>(system, "ldr:ro", ro, NrrKind::User));++ const auto RoInterfaceFactoryForUser = [&, ro] {+ return std::make_shared<RoInterface>(system, "ldr:ro", ro, NrrKind::User);+ };++ server_manager->RegisterNamedService("ldr:ro", std::move(RoInterfaceFactoryForUser));server_manager->RegisterNamedService("ro:1", std::make_shared<RoInterface>(system, "ro:1", ro, NrrKind::JitPlugin));server_manager->RegisterNamedService("ro:dmnt", std::make_shared<IDebugMonitorInterface>(system));ServerManager::RunServer(std::move(server_manager));