diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-14 03:38:10 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-04-15 01:24:02 +0200 |
commit | c6c0771b12ff7e59ec03b1a25c11233847ef0cc6 (patch) | |
tree | 053762f2eb49d0b2dc236a141756d2c59cdb0910 /src | |
parent | Merge pull request #6190 from lioncash/constfn2 (diff) | |
download | yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.tar yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.tar.gz yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.tar.bz2 yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.tar.lz yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.tar.xz yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.tar.zst yuzu-c6c0771b12ff7e59ec03b1a25c11233847ef0cc6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/common/assert.cpp | 7 | ||||
-rw-r--r-- | src/core/settings.h | 1 | ||||
-rw-r--r-- | src/yuzu/configuration/config.cpp | 3 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_debug.cpp | 2 | ||||
-rw-r--r-- | src/yuzu/configuration/configure_debug.ui | 7 | ||||
-rw-r--r-- | src/yuzu_cmd/config.cpp | 4 | ||||
-rw-r--r-- | src/yuzu_cmd/default_ini.h | 6 |
7 files changed, 28 insertions, 2 deletions
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(); + } } diff --git a/src/core/settings.h b/src/core/settings.h index 6c03a6ea9..0b7d28421 100644 --- a/src/core/settings.h +++ b/src/core/settings.h @@ -223,6 +223,7 @@ struct Values { bool quest_flag; bool disable_macro_jit; bool extended_logging; + bool use_debug_asserts; bool use_auto_stub; // Miscellaneous diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 50ea15e2a..16ea2b5f5 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -641,6 +641,8 @@ void Config::ReadDebuggingValues() { ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); Settings::values.extended_logging = ReadSetting(QStringLiteral("extended_logging"), false).toBool(); + Settings::values.use_debug_asserts = + ReadSetting(QStringLiteral("use_debug_asserts"), false).toBool(); Settings::values.use_auto_stub = ReadSetting(QStringLiteral("use_auto_stub"), false).toBool(); qt_config->endGroup(); @@ -1238,6 +1240,7 @@ void Config::SaveDebuggingValues() { WriteSetting(QStringLiteral("dump_exefs"), Settings::values.dump_exefs, false); WriteSetting(QStringLiteral("dump_nso"), Settings::values.dump_nso, false); WriteSetting(QStringLiteral("quest_flag"), Settings::values.quest_flag, false); + WriteSetting(QStringLiteral("use_debug_asserts"), Settings::values.use_debug_asserts, false); WriteSetting(QStringLiteral("disable_macro_jit"), Settings::values.disable_macro_jit, false); qt_config->endGroup(); diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 2a5b3f5e7..db8fdc595 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp @@ -34,6 +34,7 @@ void ConfigureDebug::SetConfiguration() { ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); ui->reporting_services->setChecked(Settings::values.reporting_services); ui->quest_flag->setChecked(Settings::values.quest_flag); + ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts); ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); @@ -48,6 +49,7 @@ void ConfigureDebug::ApplyConfiguration() { Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); Settings::values.reporting_services = ui->reporting_services->isChecked(); Settings::values.quest_flag = ui->quest_flag->isChecked(); + Settings::values.use_debug_asserts = ui->use_debug_asserts->isChecked(); Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); diff --git a/src/yuzu/configuration/configure_debug.ui b/src/yuzu/configuration/configure_debug.ui index ae48b728c..d812858b6 100644 --- a/src/yuzu/configuration/configure_debug.ui +++ b/src/yuzu/configuration/configure_debug.ui @@ -186,6 +186,13 @@ </widget> </item> <item> + <widget class="QCheckBox" name="use_debug_asserts"> + <property name="text"> + <string>Enable Debug Asserts</string> + </property> + </widget> + </item> + <item> <widget class="QCheckBox" name="use_auto_stub"> <property name="text"> <string>Enable Auto-Stub</string> diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 43877fc98..69732ee51 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp @@ -428,6 +428,10 @@ void Config::ReadValues() { Settings::values.reporting_services = sdl2_config->GetBoolean("Debugging", "reporting_services", false); Settings::values.quest_flag = sdl2_config->GetBoolean("Debugging", "quest_flag", false); + Settings::values.use_debug_asserts = + sdl2_config->GetBoolean("Debugging", "use_debug_asserts", false); + Settings::values.use_auto_stub = sdl2_config->GetBoolean("Debugging", "use_auto_stub", false); + Settings::values.disable_macro_jit = sdl2_config->GetBoolean("Debugging", "disable_macro_jit", false); diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 3ee0e037d..4ce8e08e4 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h @@ -325,6 +325,12 @@ dump_nso=false # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode # false: Retail/Normal Mode (default), true: Kiosk Mode quest_flag = +# Determines whether debug asserts should be enabled, which will throw an exception on asserts. +# false: Disabled (default), true: Enabled +use_debug_asserts = +# Determines whether unimplemented HLE service calls should be automatically stubbed. +# false: Disabled (default), true: Enabled +use_auto_stub = # Enables/Disables the macro JIT compiler disable_macro_jit=false |