summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/common/CMakeLists.txt4
-rw-r--r--src/common/assert.cpp7
-rw-r--r--src/common/logging/backend.cpp2
-rw-r--r--src/common/settings.cpp (renamed from src/core/settings.cpp)15
-rw-r--r--src/common/settings.h (renamed from src/core/settings.h)15
-rw-r--r--src/common/settings_input.cpp (renamed from src/input_common/settings.cpp)2
-rw-r--r--src/common/settings_input.h (renamed from src/input_common/settings.h)1
7 files changed, 20 insertions, 26 deletions
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt
index 9f8dafa3b..88644eeb6 100644
--- a/src/common/CMakeLists.txt
+++ b/src/common/CMakeLists.txt
@@ -152,6 +152,10 @@ add_library(common STATIC
scm_rev.cpp
scm_rev.h
scope_exit.h
+ settings.cpp
+ settings.h
+ settings_input.cpp
+ settings_input.h
spin_lock.cpp
spin_lock.h
stream.cpp
diff --git a/src/common/assert.cpp b/src/common/assert.cpp
index d7d91b96b..72f1121aa 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 "common/settings.h"
+
void assert_handle_failure() {
- Crash();
+ if (Settings::values.use_debug_asserts) {
+ Crash();
+ }
}
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 4575df24d..90ee4f33f 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -21,9 +21,9 @@
#include "common/logging/backend.h"
#include "common/logging/log.h"
#include "common/logging/text_formatter.h"
+#include "common/settings.h"
#include "common/string_util.h"
#include "common/threadsafe_queue.h"
-#include "core/settings.h"
namespace Log {
diff --git a/src/core/settings.cpp b/src/common/settings.cpp
index 2ae5196e0..702b6598d 100644
--- a/src/core/settings.cpp
+++ b/src/common/settings.cpp
@@ -1,4 +1,4 @@
-// Copyright 2014 Citra Emulator Project
+// Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
@@ -7,10 +7,7 @@
#include "common/assert.h"
#include "common/file_util.h"
#include "common/logging/log.h"
-#include "core/core.h"
-#include "core/hle/service/hid/hid.h"
-#include "core/settings.h"
-#include "video_core/renderer_base.h"
+#include "common/settings.h"
namespace Settings {
@@ -32,14 +29,6 @@ std::string GetTimeZoneString() {
return timezones[time_zone_index];
}
-void Apply(Core::System& system) {
- if (system.IsPoweredOn()) {
- system.Renderer().RefreshBaseSettings();
- }
-
- Service::HID::ReloadInputDevices();
-}
-
void LogSettings() {
const auto log_setting = [](std::string_view name, const auto& value) {
LOG_INFO(Config, "{}: {}", name, value);
diff --git a/src/core/settings.h b/src/common/settings.h
index 6c03a6ea9..d39b4aa45 100644
--- a/src/core/settings.h
+++ b/src/common/settings.h
@@ -1,4 +1,4 @@
-// Copyright 2014 Citra Emulator Project
+// Copyright 2021 yuzu Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
@@ -11,16 +11,13 @@
#include <optional>
#include <string>
#include <vector>
-#include "common/common_types.h"
-#include "input_common/settings.h"
-namespace Core {
-class System;
-}
+#include "common/common_types.h"
+#include "common/settings_input.h"
namespace Settings {
-enum class RendererBackend {
+enum class RendererBackend : u32 {
OpenGL = 0,
Vulkan = 1,
};
@@ -31,7 +28,7 @@ enum class GPUAccuracy : u32 {
Extreme = 2,
};
-enum class CPUAccuracy {
+enum class CPUAccuracy : u32 {
Accurate = 0,
Unsafe = 1,
DebugMode = 2,
@@ -223,6 +220,7 @@ struct Values {
bool quest_flag;
bool disable_macro_jit;
bool extended_logging;
+ bool use_debug_asserts;
bool use_auto_stub;
// Miscellaneous
@@ -255,7 +253,6 @@ float Volume();
std::string GetTimeZoneString();
-void Apply(Core::System& system);
void LogSettings();
// Restore the global state of all applicable settings in the Values struct
diff --git a/src/input_common/settings.cpp b/src/common/settings_input.cpp
index 557e7a9a0..bea2b837b 100644
--- a/src/input_common/settings.cpp
+++ b/src/common/settings_input.cpp
@@ -2,7 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
-#include "input_common/settings.h"
+#include "common/settings_input.h"
namespace Settings {
namespace NativeButton {
diff --git a/src/input_common/settings.h b/src/common/settings_input.h
index a59f5d461..609600582 100644
--- a/src/input_common/settings.h
+++ b/src/common/settings_input.h
@@ -6,6 +6,7 @@
#include <array>
#include <string>
+
#include "common/common_types.h"
namespace Settings {