mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-04 00:47:23 +00:00
minor cleanup
This commit is contained in:
parent
e14c35950b
commit
fa0939b6ed
@ -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));
|
||||||
|
3
main.cpp
3
main.cpp
@ -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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user