From 5368d16f274f334c060c7c1acef6d2c055faf482 Mon Sep 17 00:00:00 2001 From: snepsnepsnep <11176350+snepsnepsnep@users.noreply.github.com> Date: Mon, 23 Sep 2024 01:29:24 +0200 Subject: [PATCH] fix --no-update flag on windows --- src/Startup.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/Startup.cpp b/src/Startup.cpp index 985664c..810800c 100644 --- a/src/Startup.cpp +++ b/src/Startup.cpp @@ -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[]) {