From a5f8044286828b2a5a4b32217b16ad7201d31bea Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 19 Feb 2023 20:28:17 +0100 Subject: [PATCH] Skip the launcher with the -launch flag This fixes #205 --- src/client/launcher/launcher.cpp | 3 --- src/client/main.cpp | 5 ++++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/launcher/launcher.cpp b/src/client/launcher/launcher.cpp index 8190a5a8..a85c2b3c 100644 --- a/src/client/launcher/launcher.cpp +++ b/src/client/launcher/launcher.cpp @@ -5,14 +5,11 @@ #include "html/html_window.hpp" #include "resource.hpp" -#include "component/updater.hpp" namespace launcher { bool run() { - updater::update(); - bool run_game = false; html_window window("BOIII", 550, 380); diff --git a/src/client/main.cpp b/src/client/main.cpp index e0669e2a..adcee2d4 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -13,6 +13,7 @@ #include "game/game.hpp" #include "launcher/launcher.hpp" +#include "component/updater.hpp" namespace { @@ -288,8 +289,10 @@ namespace if (!is_server) { trigger_high_performance_gpu_switch(); + updater::update(); - if (!launcher::run()) + const auto launch = utils::flags::has_flag("launch"); + if (!launch && !launcher::run()) { return 0; }