From 5ea45105df409dda584fbae5e0261e3dd81c6016 Mon Sep 17 00:00:00 2001 From: Anonymous275 <36374260+Anonymous-275@users.noreply.github.com> Date: Wed, 19 Jan 2022 01:08:19 +0200 Subject: [PATCH] fixed custom user --- src/Launcher.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Launcher.cpp b/src/Launcher.cpp index 1519f7d..e9862e6 100644 --- a/src/Launcher.cpp +++ b/src/Launcher.cpp @@ -78,7 +78,11 @@ void Launcher::QueryRegistry() { RegCloseKey(BeamNG); if(BeamUserPath.empty() && !BeamVersion.empty()) { BeamUserPath = GetLocalAppdata(); + } else if(!BeamUserPath.empty()) { + VersionParser GameVer(BeamVersion); + BeamUserPath += std::to_string(GameVer.data[0]) + '.' + std::to_string(GameVer.data[1]) + '\\'; } + LOG(INFO) << BeamUserPath; if(!BeamRoot.empty() && !BeamVersion.empty() && !BeamUserPath.empty())return; } LOG(FATAL) << "Please launch the game at least once, failed to read registry key Software\\BeamNG\\BeamNG.drive";