mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-06-19 23:20:57 +00:00
minor edit
This commit is contained in:
+2
-4
@@ -44,12 +44,10 @@ void Launcher::LaunchGame() {
|
|||||||
|
|
||||||
void Launcher::WaitForGame() {
|
void Launcher::WaitForGame() {
|
||||||
LOG(INFO) << "Waiting for game launch";
|
LOG(INFO) << "Waiting for game launch";
|
||||||
int Timeout = 0;
|
|
||||||
do{
|
do{
|
||||||
Timeout++;
|
|
||||||
GamePID = Memory::GetProcessID("BeamNG.drive.x64.exe");
|
GamePID = Memory::GetProcessID("BeamNG.drive.x64.exe");
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
std::this_thread::sleep_for(std::chrono::milliseconds(500));
|
||||||
}while(GamePID == 0 && !Shutdown && Timeout < 600);
|
}while(GamePID == 0 && !Shutdown);
|
||||||
if(GamePID == 0) {
|
if(GamePID == 0) {
|
||||||
LOG(FATAL) << "Game process not found! aborting";
|
LOG(FATAL) << "Game process not found! aborting";
|
||||||
throw ShutdownException("Fatal Error");
|
throw ShutdownException("Fatal Error");
|
||||||
|
|||||||
Reference in New Issue
Block a user