From 1afcf02741853bafc10ad99e51a6453455ab0cf0 Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Mon, 17 Mar 2025 12:21:22 +0100 Subject: [PATCH] client: make the error popup disableable --- src/engine/client/ClientApplication.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/engine/client/ClientApplication.cpp b/src/engine/client/ClientApplication.cpp index dde831b82a..eef3888473 100644 --- a/src/engine/client/ClientApplication.cpp +++ b/src/engine/client/ClientApplication.cpp @@ -42,6 +42,8 @@ extern SDL_Window *window; #endif #endif +static Cvar::Cvar client_errorPopup("client.errorPopup", "Enable the error popup window", Cvar::NONE, true); + namespace Application { class ClientApplication : public Application { @@ -126,7 +128,7 @@ class ClientApplication : public Application { void Shutdown(bool error, Str::StringRef message) override { #if defined(_WIN32) || defined(BUILD_GRAPHICAL_CLIENT) - if (error) { + if (error && client_errorPopup.Get()) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, PRODUCT_NAME, message.c_str(), window); } #endif