From c6c0771b12ff7e59ec03b1a25c11233847ef0cc6 Mon Sep 17 00:00:00 2001 From: bunnei Date: Tue, 13 Apr 2021 18:38:10 -0700 Subject: core: settings: Add setting for debug assertions and disable by default. - This is a developer-only setting and no longer needs to be enabled by default. - Also adds "use_auto_stub" setting to SDL frontend while we are here. - Supersedes #1340. --- src/common/assert.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/common/assert.cpp') diff --git a/src/common/assert.cpp b/src/common/assert.cpp index d7d91b96b..4f599af55 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp @@ -3,9 +3,12 @@ // Refer to the license.txt file included. #include "common/assert.h" - #include "common/common_funcs.h" +#include "core/settings.h" + void assert_handle_failure() { - Crash(); + if (Settings::values.use_debug_asserts) { + Crash(); + } } -- cgit v1.2.3 From a4c6712a4be249bf668df7f0ff83a0a5236283b2 Mon Sep 17 00:00:00 2001 From: bunnei Date: Wed, 14 Apr 2021 16:07:40 -0700 Subject: common: Move settings to common from core. - Removes a dependency on core and input_common from common. --- src/common/assert.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/assert.cpp') diff --git a/src/common/assert.cpp b/src/common/assert.cpp index 4f599af55..72f1121aa 100644 --- a/src/common/assert.cpp +++ b/src/common/assert.cpp @@ -5,7 +5,7 @@ #include "common/assert.h" #include "common/common_funcs.h" -#include "core/settings.h" +#include "common/settings.h" void assert_handle_failure() { if (Settings::values.use_debug_asserts) { -- cgit v1.2.3