From b3abed02b4c4eb6530251aebcf3372d17129e99d Mon Sep 17 00:00:00 2001 From: pigeatgarlic <64737125+pigeatgarlic@users.noreply.github.com> Date: Sat, 20 Apr 2024 10:13:49 +0700 Subject: [PATCH] only init input if needed --- src/main.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 5aa9277f..68f9397b 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -140,7 +140,6 @@ main(int argc, char *argv[]) { BOOST_LOG(error) << "Platform failed to initialize"sv; } - auto input_deinit_guard = input::init(); int queuetype = -1; std::stringstream ss; ss << argv[2]; ss >> queuetype; @@ -153,6 +152,10 @@ main(int argc, char *argv[]) { } } + if(queuetype == QueueType::Input) { + auto input_deinit_guard = input::init(); + } + //Get buffer local address from handle SharedMemory* memory = obtain_shared_memory(argv[1]);