From 62d5936f71b9fc19bd1d3b50999e6fcbf841abdf Mon Sep 17 00:00:00 2001 From: Anonymous275 <36374260+Anonymous-275@users.noreply.github.com> Date: Wed, 19 Jan 2022 02:01:43 +0200 Subject: [PATCH] minor edit --- src/Launcher.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Launcher.cpp b/src/Launcher.cpp index 5f92f03..8d3b6a3 100644 --- a/src/Launcher.cpp +++ b/src/Launcher.cpp @@ -44,12 +44,10 @@ void Launcher::LaunchGame() { void Launcher::WaitForGame() { LOG(INFO) << "Waiting for game launch"; - int Timeout = 0; do{ - Timeout++; GamePID = Memory::GetProcessID("BeamNG.drive.x64.exe"); - std::this_thread::sleep_for(std::chrono::milliseconds(200)); - }while(GamePID == 0 && !Shutdown && Timeout < 600); + std::this_thread::sleep_for(std::chrono::milliseconds(500)); + }while(GamePID == 0 && !Shutdown); if(GamePID == 0) { LOG(FATAL) << "Game process not found! aborting"; throw ShutdownException("Fatal Error");