This commit is contained in:
MihailRis 2026-02-11 23:59:56 +03:00
parent 48f5de8adf
commit 85c085d7c3
4 changed files with 11 additions and 9 deletions

View file

@ -1,4 +1,4 @@
#include "stdin_reader.hpp"
#include "stdin_cmd_reader.hpp"
#include "engine/Engine.hpp"
#include "logic/CommandsInterpreter.hpp"
@ -12,7 +12,7 @@ static debug::Logger logger("stdin-reader");
static std::thread reader_thread;
void start_stdin_reader(Engine& engine) {
void cmd::start_stdin_cmd_reader(Engine& engine) {
reader_thread = std::thread([&engine]() {
auto& interpreter = engine.getCmd();
logger.info() << "reader thread started";

View file

@ -0,0 +1,7 @@
#pragma once
class Engine;
namespace cmd {
void start_stdin_cmd_reader(Engine& engine);
}

View file

@ -1,5 +0,0 @@
#pragma once
class Engine;
void start_stdin_reader(Engine& engine);

View file

@ -15,7 +15,7 @@
#include "devtools/DebuggingServer.hpp"
#include "devtools/Editor.hpp"
#include "devtools/Project.hpp"
#include "devtools/stdin_reader.hpp"
#include "devtools/stdin_cmd_reader.hpp"
#include "EnginePaths.hpp"
#include "frontend/locale.hpp"
#include "frontend/menu.hpp"
@ -193,7 +193,7 @@ void Engine::initialize(CoreParameters coreParameters) {
project->loadProjectClientScript();
}
if (params.stdinCommands) {
start_stdin_reader(*this);
cmd::start_stdin_cmd_reader(*this);
}
}