summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-04-15 01:07:40 +0200
committerbunnei <bunneidev@gmail.com>2021-04-15 01:24:03 +0200
commita4c6712a4be249bf668df7f0ff83a0a5236283b2 (patch)
treef05e183692b6b1e4096d285fb77db50f048ae82d /src/common
parentcore: settings: Add setting for debug assertions and disable by default. (diff)
downloadyuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.tar
yuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.tar.gz
yuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.tar.bz2
yuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.tar.lz
yuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.tar.xz
yuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.tar.zst
yuzu-a4c6712a4be249bf668df7f0ff83a0a5236283b2.zip
Diffstat (limited to '')
-rw-r--r--src/common/CMakeLists.txt4
-rw-r--r--src/common/assert.cpp2
-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)14
-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, 15 insertions, 25 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 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) {
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 0b7d28421..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,
@@ -256,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 {