mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2026-04-06 15:56:26 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c03b1d5946 | ||
|
|
5e73c7bce2 |
@@ -197,6 +197,29 @@ void LegitimacyCheck() {
|
|||||||
lowExit(5);
|
lowExit(5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
std::wstring Result;
|
||||||
|
|
||||||
|
std::string K3 = R"(Software\BeamNG\BeamNG.drive)";
|
||||||
|
|
||||||
|
HKEY hKey;
|
||||||
|
|
||||||
|
LONG dwRegOPenKey = OpenKey(HKEY_CURRENT_USER, K3.c_str(), &hKey);
|
||||||
|
if (dwRegOPenKey == ERROR_SUCCESS) {
|
||||||
|
Result = QueryKey(hKey, 3);
|
||||||
|
if (Result.empty()) {
|
||||||
|
debug("Failed to QUERY key HKEY_CURRENT_USER\\Software\\BeamNG\\BeamNG.drive");
|
||||||
|
lowExit(6);
|
||||||
|
}
|
||||||
|
GameDir = Result;
|
||||||
|
debug(L"GameDir from registry: " + Result);
|
||||||
|
} else {
|
||||||
|
debug("Failed to OPEN key HKEY_CURRENT_USER\\Software\\BeamNG\\BeamNG.drive");
|
||||||
|
lowExit(7);
|
||||||
|
}
|
||||||
|
K3.clear();
|
||||||
|
Result.clear();
|
||||||
|
RegCloseKey(hKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete[] appDataPath;
|
delete[] appDataPath;
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ std::string GetVer() {
|
|||||||
return "2.6";
|
return "2.6";
|
||||||
}
|
}
|
||||||
std::string GetPatch() {
|
std::string GetPatch() {
|
||||||
return ".2";
|
return ".3";
|
||||||
}
|
}
|
||||||
|
|
||||||
beammp_fs_string GetEP(const beammp_fs_char* P) {
|
beammp_fs_string GetEP(const beammp_fs_char* P) {
|
||||||
|
|||||||
Reference in New Issue
Block a user