From 06686688fc0e3445fa68a84b1da6253d77a33e26 Mon Sep 17 00:00:00 2001 From: Tixx <83774803+WiserTixx@users.noreply.github.com> Date: Sun, 22 Sep 2024 23:57:26 +0200 Subject: [PATCH] Move console clear to main to avoid clearing logs --- src/Startup.cpp | 2 -- src/main.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Startup.cpp b/src/Startup.cpp index 84509f5..bdce188 100644 --- a/src/Startup.cpp +++ b/src/Startup.cpp @@ -223,7 +223,6 @@ void LinuxPatch() { #if defined(_WIN32) void InitLauncher() { - system("cls"); SetConsoleTitleA(("BeamMP Launcher v" + std::string(GetVer()) + GetPatch()).c_str()); InitLog(); CheckName(); @@ -235,7 +234,6 @@ void InitLauncher() { #elif defined(__linux__) void InitLauncher() { - system("clear"); InitLog(); info("BeamMP Launcher v" + GetVer() + GetPatch()); CheckName(); diff --git a/src/main.cpp b/src/main.cpp index 325ffec..8305f44 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,6 +25,12 @@ Options options; } int main(int argc, char** argv) try { +#if defined(_WIN32) + system("cls"); +#elif defined(__linux__) + system("clear"); +#endif + #ifdef DEBUG std::thread th(flush); th.detach();