Skip to content

Commit 13886d8

Browse files
committed
client: make the error popup disableable
1 parent 6465eb2 commit 13886d8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/engine/client/ClientApplication.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ extern SDL_Window *window;
4242
#endif
4343
#endif
4444

45+
static Cvar::Cvar<bool> client_errorPopup("client.errorPopup", "Enable the error popup window", Cvar::NONE, true);
46+
4547
namespace Application {
4648

4749
class ClientApplication : public Application {
@@ -126,7 +128,7 @@ class ClientApplication : public Application {
126128

127129
void Shutdown(bool error, Str::StringRef message) override {
128130
#if defined(_WIN32) || defined(BUILD_GRAPHICAL_CLIENT)
129-
if (error) {
131+
if (error && client_errorPopup.Get()) {
130132
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, PRODUCT_NAME, message.c_str(), window);
131133
}
132134
#endif

0 commit comments

Comments
 (0)