fixed custom user

This commit is contained in:
Anonymous275
2022-01-19 01:08:19 +02:00
parent ebe8d15362
commit 5ea45105df
+4
View File
@@ -78,7 +78,11 @@ void Launcher::QueryRegistry() {
RegCloseKey(BeamNG); RegCloseKey(BeamNG);
if(BeamUserPath.empty() && !BeamVersion.empty()) { if(BeamUserPath.empty() && !BeamVersion.empty()) {
BeamUserPath = GetLocalAppdata(); 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; 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"; LOG(FATAL) << "Please launch the game at least once, failed to read registry key Software\\BeamNG\\BeamNG.drive";