minor cleanup

This commit is contained in:
Anonymous275 2020-05-02 18:27:20 +03:00
parent e14c35950b
commit fa0939b6ed
2 changed files with 3 additions and 3 deletions

View File

@ -25,8 +25,7 @@ void DeleteKey(){
HKEY hKey; HKEY hKey;
LPCTSTR sk = TEXT("Software\\BeamNG\\BeamNG.drive"); LPCTSTR sk = TEXT("Software\\BeamNG\\BeamNG.drive");
RegOpenKeyEx(HKEY_CURRENT_USER, sk, 0, KEY_ALL_ACCESS, &hKey); RegOpenKeyEx(HKEY_CURRENT_USER, sk, 0, KEY_ALL_ACCESS, &hKey);
LPCTSTR value = TEXT("userpath_override"); RegDeleteValueA(hKey, TEXT("userpath_override"));
RegDeleteValueA(hKey, value);
} }
void RollBack(const std::string&Val){ void RollBack(const std::string&Val){
std::this_thread::sleep_for(std::chrono::seconds(7)); std::this_thread::sleep_for(std::chrono::seconds(7));

View File

@ -85,7 +85,7 @@ int main(int argc, char* argv[]){
const unsigned long long NPos = std::string::npos; const unsigned long long NPos = std::string::npos;
struct stat info{}; struct stat info{};
std::string ver = "0.90", Path = CheckDir(argv[0],ver),HTTP_Result; std::string ver = "0.901", Path = CheckDir(argv[0],ver),HTTP_Result;
CheckForUpdates(ver); CheckForUpdates(ver);
if(argc > 1){ if(argc > 1){
std::string Port = argv[1]; std::string Port = argv[1];
@ -124,6 +124,7 @@ int main(int argc, char* argv[]){
std::cout << "Downloaded default config!" << std::endl; std::cout << "Downloaded default config!" << std::endl;
} }
Download("https://beamng-mp.com/builds/client?did="+GlobalInfo.at(2),Path + R"(\mods\BeamMP.zip)"); Download("https://beamng-mp.com/builds/client?did="+GlobalInfo.at(2),Path + R"(\mods\BeamMP.zip)");
if(!MPDEV){ if(!MPDEV){
std::thread Game(StartGame,ExeDir,(Path + "\\")); std::thread Game(StartGame,ExeDir,(Path + "\\"));
Game.detach(); Game.detach();