fix --no-update flag on windows

This commit is contained in:
snepsnepsnep 2024-09-23 01:29:24 +02:00
parent 188a31c69e
commit 5368d16f27

View File

@ -252,7 +252,15 @@ void InitLauncher(int argc, char* argv[]) {
CheckLocalKey();
ConfigInit();
CustomPort(argc, argv);
CheckForUpdates(argc, argv, std::string(GetVer()) + GetPatch());
bool update = true;
for (int i = 1; i < argc; ++i) {
if (std::string_view(argv[i]) == "--no-update") {
update = false;
}
}
if (update) {
CheckForUpdates(argc, argv, std::string(GetVer()) + GetPatch());
}
}
#elif defined(__linux__)
void InitLauncher(int argc, char* argv[]) {