aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/olsc/olsc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/olsc/olsc.cpp')
-rw-r--r--src/core/hle/service/olsc/olsc.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core/hle/service/olsc/olsc.cpp b/src/core/hle/service/olsc/olsc.cpp
index 26d93cf20..18e5ad43f 100644
--- a/src/core/hle/service/olsc/olsc.cpp
+++ b/src/core/hle/service/olsc/olsc.cpp
@@ -12,10 +12,16 @@ namespace Service::OLSC {
void LoopProcess(Core::System& system) {
auto server_manager = std::make_unique<ServerManager>(system);
- server_manager->RegisterNamedService("olsc:u",
- std::make_shared<IOlscServiceForApplication>(system));
- server_manager->RegisterNamedService("olsc:s",
- std::make_shared<IOlscServiceForSystemService>(system));
+ const auto OlscFactoryForApplication = [&] {
+ return std::make_shared<IOlscServiceForApplication>(system);
+ };
+
+ const auto OlscFactoryForSystemService = [&] {
+ return std::make_shared<IOlscServiceForSystemService>(system);
+ };
+
+ server_manager->RegisterNamedService("olsc:u", OlscFactoryForApplication);
+ server_manager->RegisterNamedService("olsc:s", OlscFactoryForSystemService);
ServerManager::RunServer(std::move(server_manager));
}