diff options
133 files changed, 262 insertions, 231 deletions
diff --git a/src/audio_core/audio_out.cpp b/src/audio_core/audio_out.cpp index fe3a898ad..20a756dce 100644 --- a/src/audio_core/audio_out.cpp +++ b/src/audio_core/audio_out.cpp | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include "audio_core/sink_details.h" | 7 | #include "audio_core/sink_details.h" |
| 8 | #include "common/assert.h" | 8 | #include "common/assert.h" |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "core/settings.h" | 10 | #include "common/settings.h" |
| 11 | 11 | ||
| 12 | namespace AudioCore { | 12 | namespace AudioCore { |
| 13 | 13 | ||
diff --git a/src/audio_core/audio_renderer.cpp b/src/audio_core/audio_renderer.cpp index d2ce8c814..ae2201c36 100644 --- a/src/audio_core/audio_renderer.cpp +++ b/src/audio_core/audio_renderer.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | #include "audio_core/info_updater.h" | 11 | #include "audio_core/info_updater.h" |
| 12 | #include "audio_core/voice_context.h" | 12 | #include "audio_core/voice_context.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/settings.h" | ||
| 14 | #include "core/memory.h" | 15 | #include "core/memory.h" |
| 15 | #include "core/settings.h" | ||
| 16 | 16 | ||
| 17 | namespace { | 17 | namespace { |
| 18 | [[nodiscard]] static constexpr s16 ClampToS16(s32 value) { | 18 | [[nodiscard]] static constexpr s16 ClampToS16(s32 value) { |
diff --git a/src/audio_core/cubeb_sink.cpp b/src/audio_core/cubeb_sink.cpp index 043447eaa..93c35e785 100644 --- a/src/audio_core/cubeb_sink.cpp +++ b/src/audio_core/cubeb_sink.cpp | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include "common/assert.h" | 11 | #include "common/assert.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/ring_buffer.h" | 13 | #include "common/ring_buffer.h" |
| 14 | #include "core/settings.h" | 14 | #include "common/settings.h" |
| 15 | 15 | ||
| 16 | #ifdef _WIN32 | 16 | #ifdef _WIN32 |
| 17 | #include <objbase.h> | 17 | #include <objbase.h> |
diff --git a/src/audio_core/stream.cpp b/src/audio_core/stream.cpp index b0f6f0c34..ad6c587c2 100644 --- a/src/audio_core/stream.cpp +++ b/src/audio_core/stream.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | #include "audio_core/stream.h" | 11 | #include "audio_core/stream.h" |
| 12 | #include "common/assert.h" | 12 | #include "common/assert.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/settings.h" | ||
| 14 | #include "core/core_timing.h" | 15 | #include "core/core_timing.h" |
| 15 | #include "core/settings.h" | ||
| 16 | 16 | ||
| 17 | namespace AudioCore { | 17 | namespace AudioCore { |
| 18 | 18 | ||
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 | |||
| 152 | scm_rev.cpp | 152 | scm_rev.cpp |
| 153 | scm_rev.h | 153 | scm_rev.h |
| 154 | scope_exit.h | 154 | scope_exit.h |
| 155 | settings.cpp | ||
| 156 | settings.h | ||
| 157 | settings_input.cpp | ||
| 158 | settings_input.h | ||
| 155 | spin_lock.cpp | 159 | spin_lock.cpp |
| 156 | spin_lock.h | 160 | spin_lock.h |
| 157 | stream.cpp | 161 | 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 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/assert.h" | 5 | #include "common/assert.h" |
| 6 | |||
| 7 | #include "common/common_funcs.h" | 6 | #include "common/common_funcs.h" |
| 8 | 7 | ||
| 8 | #include "common/settings.h" | ||
| 9 | |||
| 9 | void assert_handle_failure() { | 10 | void assert_handle_failure() { |
| 10 | Crash(); | 11 | if (Settings::values.use_debug_asserts) { |
| 12 | Crash(); | ||
| 13 | } | ||
| 11 | } | 14 | } |
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp index 2e0467ef4..bc82905c0 100644 --- a/src/common/logging/backend.cpp +++ b/src/common/logging/backend.cpp | |||
| @@ -21,9 +21,9 @@ | |||
| 21 | #include "common/logging/backend.h" | 21 | #include "common/logging/backend.h" |
| 22 | #include "common/logging/log.h" | 22 | #include "common/logging/log.h" |
| 23 | #include "common/logging/text_formatter.h" | 23 | #include "common/logging/text_formatter.h" |
| 24 | #include "common/settings.h" | ||
| 24 | #include "common/string_util.h" | 25 | #include "common/string_util.h" |
| 25 | #include "common/threadsafe_queue.h" | 26 | #include "common/threadsafe_queue.h" |
| 26 | #include "core/settings.h" | ||
| 27 | 27 | ||
| 28 | namespace Common::Log { | 28 | namespace Common::Log { |
| 29 | 29 | ||
diff --git a/src/common/nvidia_flags.h b/src/common/nvidia_flags.h index 75a0233ac..8930efcec 100644 --- a/src/common/nvidia_flags.h +++ b/src/common/nvidia_flags.h | |||
| @@ -2,6 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #pragma once | ||
| 6 | |||
| 5 | namespace Common { | 7 | namespace Common { |
| 6 | 8 | ||
| 7 | /// Configure platform specific flags for Nvidia's driver | 9 | /// Configure platform specific flags for Nvidia's driver |
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 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | 1 | // Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| @@ -7,10 +7,7 @@ | |||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/file_util.h" | 8 | #include "common/file_util.h" |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "core/core.h" | 10 | #include "common/settings.h" |
| 11 | #include "core/hle/service/hid/hid.h" | ||
| 12 | #include "core/settings.h" | ||
| 13 | #include "video_core/renderer_base.h" | ||
| 14 | 11 | ||
| 15 | namespace Settings { | 12 | namespace Settings { |
| 16 | 13 | ||
| @@ -32,14 +29,6 @@ std::string GetTimeZoneString() { | |||
| 32 | return timezones[time_zone_index]; | 29 | return timezones[time_zone_index]; |
| 33 | } | 30 | } |
| 34 | 31 | ||
| 35 | void Apply(Core::System& system) { | ||
| 36 | if (system.IsPoweredOn()) { | ||
| 37 | system.Renderer().RefreshBaseSettings(); | ||
| 38 | } | ||
| 39 | |||
| 40 | Service::HID::ReloadInputDevices(); | ||
| 41 | } | ||
| 42 | |||
| 43 | void LogSettings() { | 32 | void LogSettings() { |
| 44 | const auto log_setting = [](std::string_view name, const auto& value) { | 33 | const auto log_setting = [](std::string_view name, const auto& value) { |
| 45 | LOG_INFO(Config, "{}: {}", name, value); | 34 | 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 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | 1 | // Copyright 2021 yuzu Emulator Project |
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| @@ -11,16 +11,13 @@ | |||
| 11 | #include <optional> | 11 | #include <optional> |
| 12 | #include <string> | 12 | #include <string> |
| 13 | #include <vector> | 13 | #include <vector> |
| 14 | #include "common/common_types.h" | ||
| 15 | #include "input_common/settings.h" | ||
| 16 | 14 | ||
| 17 | namespace Core { | 15 | #include "common/common_types.h" |
| 18 | class System; | 16 | #include "common/settings_input.h" |
| 19 | } | ||
| 20 | 17 | ||
| 21 | namespace Settings { | 18 | namespace Settings { |
| 22 | 19 | ||
| 23 | enum class RendererBackend { | 20 | enum class RendererBackend : u32 { |
| 24 | OpenGL = 0, | 21 | OpenGL = 0, |
| 25 | Vulkan = 1, | 22 | Vulkan = 1, |
| 26 | }; | 23 | }; |
| @@ -31,7 +28,7 @@ enum class GPUAccuracy : u32 { | |||
| 31 | Extreme = 2, | 28 | Extreme = 2, |
| 32 | }; | 29 | }; |
| 33 | 30 | ||
| 34 | enum class CPUAccuracy { | 31 | enum class CPUAccuracy : u32 { |
| 35 | Accurate = 0, | 32 | Accurate = 0, |
| 36 | Unsafe = 1, | 33 | Unsafe = 1, |
| 37 | DebugMode = 2, | 34 | DebugMode = 2, |
| @@ -223,6 +220,7 @@ struct Values { | |||
| 223 | bool quest_flag; | 220 | bool quest_flag; |
| 224 | bool disable_macro_jit; | 221 | bool disable_macro_jit; |
| 225 | bool extended_logging; | 222 | bool extended_logging; |
| 223 | bool use_debug_asserts; | ||
| 226 | bool use_auto_stub; | 224 | bool use_auto_stub; |
| 227 | 225 | ||
| 228 | // Miscellaneous | 226 | // Miscellaneous |
| @@ -255,7 +253,6 @@ float Volume(); | |||
| 255 | 253 | ||
| 256 | std::string GetTimeZoneString(); | 254 | std::string GetTimeZoneString(); |
| 257 | 255 | ||
| 258 | void Apply(Core::System& system); | ||
| 259 | void LogSettings(); | 256 | void LogSettings(); |
| 260 | 257 | ||
| 261 | // Restore the global state of all applicable settings in the Values struct | 258 | // 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 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "input_common/settings.h" | 5 | #include "common/settings_input.h" |
| 6 | 6 | ||
| 7 | namespace Settings { | 7 | namespace Settings { |
| 8 | namespace NativeButton { | 8 | 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 @@ | |||
| 6 | 6 | ||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <string> | 8 | #include <string> |
| 9 | |||
| 9 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 10 | 11 | ||
| 11 | namespace Settings { | 12 | namespace Settings { |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 167ee13f3..286e912e3 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -621,8 +621,6 @@ add_library(core STATIC | |||
| 621 | perf_stats.h | 621 | perf_stats.h |
| 622 | reporter.cpp | 622 | reporter.cpp |
| 623 | reporter.h | 623 | reporter.h |
| 624 | settings.cpp | ||
| 625 | settings.h | ||
| 626 | telemetry_session.cpp | 624 | telemetry_session.cpp |
| 627 | telemetry_session.h | 625 | telemetry_session.h |
| 628 | tools/freezer.cpp | 626 | tools/freezer.cpp |
diff --git a/src/core/arm/dynarmic/arm_dynarmic_32.cpp b/src/core/arm/dynarmic/arm_dynarmic_32.cpp index 08d889135..7aeb2a658 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_32.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_32.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "common/assert.h" | 10 | #include "common/assert.h" |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/page_table.h" | 12 | #include "common/page_table.h" |
| 13 | #include "common/settings.h" | ||
| 13 | #include "core/arm/cpu_interrupt_handler.h" | 14 | #include "core/arm/cpu_interrupt_handler.h" |
| 14 | #include "core/arm/dynarmic/arm_dynarmic_32.h" | 15 | #include "core/arm/dynarmic/arm_dynarmic_32.h" |
| 15 | #include "core/arm/dynarmic/arm_dynarmic_cp15.h" | 16 | #include "core/arm/dynarmic/arm_dynarmic_cp15.h" |
| @@ -18,7 +19,6 @@ | |||
| 18 | #include "core/core_timing.h" | 19 | #include "core/core_timing.h" |
| 19 | #include "core/hle/kernel/svc.h" | 20 | #include "core/hle/kernel/svc.h" |
| 20 | #include "core/memory.h" | 21 | #include "core/memory.h" |
| 21 | #include "core/settings.h" | ||
| 22 | 22 | ||
| 23 | namespace Core { | 23 | namespace Core { |
| 24 | 24 | ||
diff --git a/src/core/arm/dynarmic/arm_dynarmic_64.cpp b/src/core/arm/dynarmic/arm_dynarmic_64.cpp index e12e50658..040529f4d 100644 --- a/src/core/arm/dynarmic/arm_dynarmic_64.cpp +++ b/src/core/arm/dynarmic/arm_dynarmic_64.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/assert.h" | 9 | #include "common/assert.h" |
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | #include "common/page_table.h" | 11 | #include "common/page_table.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "core/arm/cpu_interrupt_handler.h" | 13 | #include "core/arm/cpu_interrupt_handler.h" |
| 13 | #include "core/arm/dynarmic/arm_dynarmic_64.h" | 14 | #include "core/arm/dynarmic/arm_dynarmic_64.h" |
| 14 | #include "core/arm/dynarmic/arm_exclusive_monitor.h" | 15 | #include "core/arm/dynarmic/arm_exclusive_monitor.h" |
| @@ -19,7 +20,6 @@ | |||
| 19 | #include "core/hle/kernel/process.h" | 20 | #include "core/hle/kernel/process.h" |
| 20 | #include "core/hle/kernel/svc.h" | 21 | #include "core/hle/kernel/svc.h" |
| 21 | #include "core/memory.h" | 22 | #include "core/memory.h" |
| 22 | #include "core/settings.h" | ||
| 23 | 23 | ||
| 24 | namespace Core { | 24 | namespace Core { |
| 25 | 25 | ||
diff --git a/src/core/core.cpp b/src/core/core.cpp index 56b47e671..d459d6c34 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/file_util.h" | 9 | #include "common/file_util.h" |
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | #include "common/microprofile.h" | 11 | #include "common/microprofile.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "common/string_util.h" | 13 | #include "common/string_util.h" |
| 13 | #include "core/arm/exclusive_monitor.h" | 14 | #include "core/arm/exclusive_monitor.h" |
| 14 | #include "core/core.h" | 15 | #include "core/core.h" |
| @@ -36,6 +37,7 @@ | |||
| 36 | #include "core/hle/service/apm/controller.h" | 37 | #include "core/hle/service/apm/controller.h" |
| 37 | #include "core/hle/service/filesystem/filesystem.h" | 38 | #include "core/hle/service/filesystem/filesystem.h" |
| 38 | #include "core/hle/service/glue/manager.h" | 39 | #include "core/hle/service/glue/manager.h" |
| 40 | #include "core/hle/service/hid/hid.h" | ||
| 39 | #include "core/hle/service/service.h" | 41 | #include "core/hle/service/service.h" |
| 40 | #include "core/hle/service/sm/sm.h" | 42 | #include "core/hle/service/sm/sm.h" |
| 41 | #include "core/hle/service/time/time_manager.h" | 43 | #include "core/hle/service/time/time_manager.h" |
| @@ -45,7 +47,6 @@ | |||
| 45 | #include "core/network/network.h" | 47 | #include "core/network/network.h" |
| 46 | #include "core/perf_stats.h" | 48 | #include "core/perf_stats.h" |
| 47 | #include "core/reporter.h" | 49 | #include "core/reporter.h" |
| 48 | #include "core/settings.h" | ||
| 49 | #include "core/telemetry_session.h" | 50 | #include "core/telemetry_session.h" |
| 50 | #include "core/tools/freezer.h" | 51 | #include "core/tools/freezer.h" |
| 51 | #include "video_core/renderer_base.h" | 52 | #include "video_core/renderer_base.h" |
| @@ -774,4 +775,12 @@ void System::ExecuteProgram(std::size_t program_index) { | |||
| 774 | } | 775 | } |
| 775 | } | 776 | } |
| 776 | 777 | ||
| 778 | void System::ApplySettings() { | ||
| 779 | if (IsPoweredOn()) { | ||
| 780 | Renderer().RefreshBaseSettings(); | ||
| 781 | } | ||
| 782 | |||
| 783 | Service::HID::ReloadInputDevices(); | ||
| 784 | } | ||
| 785 | |||
| 777 | } // namespace Core | 786 | } // namespace Core |
diff --git a/src/core/core.h b/src/core/core.h index 3a8e040c1..f1068d23f 100644 --- a/src/core/core.h +++ b/src/core/core.h | |||
| @@ -388,6 +388,9 @@ public: | |||
| 388 | */ | 388 | */ |
| 389 | void ExecuteProgram(std::size_t program_index); | 389 | void ExecuteProgram(std::size_t program_index); |
| 390 | 390 | ||
| 391 | /// Applies any changes to settings to this core instance. | ||
| 392 | void ApplySettings(); | ||
| 393 | |||
| 391 | private: | 394 | private: |
| 392 | System(); | 395 | System(); |
| 393 | 396 | ||
diff --git a/src/core/crypto/key_manager.cpp b/src/core/crypto/key_manager.cpp index ad116dcc0..070ed439e 100644 --- a/src/core/crypto/key_manager.cpp +++ b/src/core/crypto/key_manager.cpp | |||
| @@ -22,6 +22,7 @@ | |||
| 22 | #include "common/file_util.h" | 22 | #include "common/file_util.h" |
| 23 | #include "common/hex_util.h" | 23 | #include "common/hex_util.h" |
| 24 | #include "common/logging/log.h" | 24 | #include "common/logging/log.h" |
| 25 | #include "common/settings.h" | ||
| 25 | #include "common/string_util.h" | 26 | #include "common/string_util.h" |
| 26 | #include "core/crypto/aes_util.h" | 27 | #include "core/crypto/aes_util.h" |
| 27 | #include "core/crypto/key_manager.h" | 28 | #include "core/crypto/key_manager.h" |
| @@ -32,7 +33,6 @@ | |||
| 32 | #include "core/file_sys/registered_cache.h" | 33 | #include "core/file_sys/registered_cache.h" |
| 33 | #include "core/hle/service/filesystem/filesystem.h" | 34 | #include "core/hle/service/filesystem/filesystem.h" |
| 34 | #include "core/loader/loader.h" | 35 | #include "core/loader/loader.h" |
| 35 | #include "core/settings.h" | ||
| 36 | 36 | ||
| 37 | namespace Core::Crypto { | 37 | namespace Core::Crypto { |
| 38 | namespace { | 38 | namespace { |
diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index 7c3284df8..cc9b4b637 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "common/file_util.h" | 10 | #include "common/file_util.h" |
| 11 | #include "common/hex_util.h" | 11 | #include "common/hex_util.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/settings.h" | ||
| 13 | #include "common/string_util.h" | 14 | #include "common/string_util.h" |
| 14 | #include "core/core.h" | 15 | #include "core/core.h" |
| 15 | #include "core/file_sys/common_funcs.h" | 16 | #include "core/file_sys/common_funcs.h" |
| @@ -25,7 +26,6 @@ | |||
| 25 | #include "core/loader/loader.h" | 26 | #include "core/loader/loader.h" |
| 26 | #include "core/loader/nso.h" | 27 | #include "core/loader/nso.h" |
| 27 | #include "core/memory/cheat_engine.h" | 28 | #include "core/memory/cheat_engine.h" |
| 28 | #include "core/settings.h" | ||
| 29 | 29 | ||
| 30 | namespace FileSys { | 30 | namespace FileSys { |
| 31 | namespace { | 31 | namespace { |
diff --git a/src/core/frontend/applets/profile_select.cpp b/src/core/frontend/applets/profile_select.cpp index 4df3574d2..8d960d1ca 100644 --- a/src/core/frontend/applets/profile_select.cpp +++ b/src/core/frontend/applets/profile_select.cpp | |||
| @@ -2,9 +2,9 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/settings.h" | ||
| 5 | #include "core/frontend/applets/profile_select.h" | 6 | #include "core/frontend/applets/profile_select.h" |
| 6 | #include "core/hle/service/acc/profile_manager.h" | 7 | #include "core/hle/service/acc/profile_manager.h" |
| 7 | #include "core/settings.h" | ||
| 8 | 8 | ||
| 9 | namespace Core::Frontend { | 9 | namespace Core::Frontend { |
| 10 | 10 | ||
diff --git a/src/core/frontend/emu_window.cpp b/src/core/frontend/emu_window.cpp index ee7a58b1c..474de9206 100644 --- a/src/core/frontend/emu_window.cpp +++ b/src/core/frontend/emu_window.cpp | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #include <cmath> | 5 | #include <cmath> |
| 6 | #include <mutex> | 6 | #include <mutex> |
| 7 | #include "common/settings.h" | ||
| 7 | #include "core/frontend/emu_window.h" | 8 | #include "core/frontend/emu_window.h" |
| 8 | #include "core/frontend/input.h" | 9 | #include "core/frontend/input.h" |
| 9 | #include "core/settings.h" | ||
| 10 | 10 | ||
| 11 | namespace Core::Frontend { | 11 | namespace Core::Frontend { |
| 12 | 12 | ||
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index b9a270a55..0832463d6 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | #include <cmath> | 5 | #include <cmath> |
| 6 | 6 | ||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "core/frontend/framebuffer_layout.h" | 9 | #include "core/frontend/framebuffer_layout.h" |
| 9 | #include "core/settings.h" | ||
| 10 | 10 | ||
| 11 | namespace Layout { | 11 | namespace Layout { |
| 12 | 12 | ||
diff --git a/src/core/hle/kernel/k_resource_limit.cpp b/src/core/hle/kernel/k_resource_limit.cpp index d7a4a38e6..d05b34ea3 100644 --- a/src/core/hle/kernel/k_resource_limit.cpp +++ b/src/core/hle/kernel/k_resource_limit.cpp | |||
| @@ -2,21 +2,16 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | // This file references various implementation details from Atmosphere, an open-source firmware for | ||
| 6 | // the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. | ||
| 7 | |||
| 8 | #include "common/assert.h" | 5 | #include "common/assert.h" |
| 9 | #include "core/core.h" | ||
| 10 | #include "core/core_timing.h" | 6 | #include "core/core_timing.h" |
| 11 | #include "core/core_timing_util.h" | ||
| 12 | #include "core/hle/kernel/k_resource_limit.h" | 7 | #include "core/hle/kernel/k_resource_limit.h" |
| 13 | #include "core/hle/kernel/svc_results.h" | 8 | #include "core/hle/kernel/svc_results.h" |
| 14 | 9 | ||
| 15 | namespace Kernel { | 10 | namespace Kernel { |
| 16 | constexpr s64 DefaultTimeout = 10000000000; // 10 seconds | 11 | constexpr s64 DefaultTimeout = 10000000000; // 10 seconds |
| 17 | 12 | ||
| 18 | KResourceLimit::KResourceLimit(KernelCore& kernel, Core::System& system) | 13 | KResourceLimit::KResourceLimit(KernelCore& kernel, const Core::Timing::CoreTiming& core_timing_) |
| 19 | : Object{kernel}, lock{kernel}, cond_var{kernel}, kernel{kernel}, system(system) {} | 14 | : Object{kernel}, lock{kernel}, cond_var{kernel}, core_timing(core_timing_) {} |
| 20 | KResourceLimit::~KResourceLimit() = default; | 15 | KResourceLimit::~KResourceLimit() = default; |
| 21 | 16 | ||
| 22 | s64 KResourceLimit::GetLimitValue(LimitableResource which) const { | 17 | s64 KResourceLimit::GetLimitValue(LimitableResource which) const { |
| @@ -83,7 +78,7 @@ ResultCode KResourceLimit::SetLimitValue(LimitableResource which, s64 value) { | |||
| 83 | } | 78 | } |
| 84 | 79 | ||
| 85 | bool KResourceLimit::Reserve(LimitableResource which, s64 value) { | 80 | bool KResourceLimit::Reserve(LimitableResource which, s64 value) { |
| 86 | return Reserve(which, value, system.CoreTiming().GetGlobalTimeNs().count() + DefaultTimeout); | 81 | return Reserve(which, value, core_timing.GetGlobalTimeNs().count() + DefaultTimeout); |
| 87 | } | 82 | } |
| 88 | 83 | ||
| 89 | bool KResourceLimit::Reserve(LimitableResource which, s64 value, s64 timeout) { | 84 | bool KResourceLimit::Reserve(LimitableResource which, s64 value, s64 timeout) { |
| @@ -114,7 +109,7 @@ bool KResourceLimit::Reserve(LimitableResource which, s64 value, s64 timeout) { | |||
| 114 | } | 109 | } |
| 115 | 110 | ||
| 116 | if (current_hints[index] + value <= limit_values[index] && | 111 | if (current_hints[index] + value <= limit_values[index] && |
| 117 | (timeout < 0 || system.CoreTiming().GetGlobalTimeNs().count() < timeout)) { | 112 | (timeout < 0 || core_timing.GetGlobalTimeNs().count() < timeout)) { |
| 118 | waiter_count++; | 113 | waiter_count++; |
| 119 | cond_var.Wait(&lock, timeout); | 114 | cond_var.Wait(&lock, timeout); |
| 120 | waiter_count--; | 115 | waiter_count--; |
diff --git a/src/core/hle/kernel/k_resource_limit.h b/src/core/hle/kernel/k_resource_limit.h index 58ae456f1..4542317d0 100644 --- a/src/core/hle/kernel/k_resource_limit.h +++ b/src/core/hle/kernel/k_resource_limit.h | |||
| @@ -2,9 +2,6 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | // This file references various implementation details from Atmosphere, an open-source firmware for | ||
| 6 | // the Nintendo Switch. Copyright 2018-2020 Atmosphere-NX. | ||
| 7 | |||
| 8 | #pragma once | 5 | #pragma once |
| 9 | 6 | ||
| 10 | #include <array> | 7 | #include <array> |
| @@ -15,8 +12,8 @@ | |||
| 15 | 12 | ||
| 16 | union ResultCode; | 13 | union ResultCode; |
| 17 | 14 | ||
| 18 | namespace Core { | 15 | namespace Core::Timing { |
| 19 | class System; | 16 | class CoreTiming; |
| 20 | } | 17 | } |
| 21 | 18 | ||
| 22 | namespace Kernel { | 19 | namespace Kernel { |
| @@ -37,7 +34,7 @@ constexpr bool IsValidResourceType(LimitableResource type) { | |||
| 37 | 34 | ||
| 38 | class KResourceLimit final : public Object { | 35 | class KResourceLimit final : public Object { |
| 39 | public: | 36 | public: |
| 40 | explicit KResourceLimit(KernelCore& kernel, Core::System& system); | 37 | explicit KResourceLimit(KernelCore& kernel, const Core::Timing::CoreTiming& core_timing_); |
| 41 | ~KResourceLimit(); | 38 | ~KResourceLimit(); |
| 42 | 39 | ||
| 43 | s64 GetLimitValue(LimitableResource which) const; | 40 | s64 GetLimitValue(LimitableResource which) const; |
| @@ -75,7 +72,6 @@ private: | |||
| 75 | mutable KLightLock lock; | 72 | mutable KLightLock lock; |
| 76 | s32 waiter_count{}; | 73 | s32 waiter_count{}; |
| 77 | KLightConditionVariable cond_var; | 74 | KLightConditionVariable cond_var; |
| 78 | KernelCore& kernel; | 75 | const Core::Timing::CoreTiming& core_timing; |
| 79 | Core::System& system; | ||
| 80 | }; | 76 | }; |
| 81 | } // namespace Kernel | 77 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 8fd990577..5c4f45ab4 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -67,8 +67,13 @@ struct KernelCore::Impl { | |||
| 67 | is_phantom_mode_for_singlecore = false; | 67 | is_phantom_mode_for_singlecore = false; |
| 68 | 68 | ||
| 69 | InitializePhysicalCores(); | 69 | InitializePhysicalCores(); |
| 70 | InitializeSystemResourceLimit(kernel, system); | 70 | |
| 71 | InitializeMemoryLayout(); | 71 | // Derive the initial memory layout from the emulated board |
| 72 | KMemoryLayout memory_layout; | ||
| 73 | DeriveInitialMemoryLayout(memory_layout); | ||
| 74 | InitializeMemoryLayout(memory_layout); | ||
| 75 | InitializeSystemResourceLimit(kernel, system.CoreTiming(), memory_layout); | ||
| 76 | InitializeSlabHeaps(); | ||
| 72 | InitializeSchedulers(); | 77 | InitializeSchedulers(); |
| 73 | InitializeSuspendThreads(); | 78 | InitializeSuspendThreads(); |
| 74 | InitializePreemption(kernel); | 79 | InitializePreemption(kernel); |
| @@ -137,27 +142,33 @@ struct KernelCore::Impl { | |||
| 137 | } | 142 | } |
| 138 | 143 | ||
| 139 | // Creates the default system resource limit | 144 | // Creates the default system resource limit |
| 140 | void InitializeSystemResourceLimit(KernelCore& kernel, Core::System& system) { | 145 | void InitializeSystemResourceLimit(KernelCore& kernel, |
| 141 | system_resource_limit = std::make_shared<KResourceLimit>(kernel, system); | 146 | const Core::Timing::CoreTiming& core_timing, |
| 147 | const KMemoryLayout& memory_layout) { | ||
| 148 | system_resource_limit = std::make_shared<KResourceLimit>(kernel, core_timing); | ||
| 149 | const auto [total_size, kernel_size] = memory_layout.GetTotalAndKernelMemorySizes(); | ||
| 142 | 150 | ||
| 143 | // If setting the default system values fails, then something seriously wrong has occurred. | 151 | // If setting the default system values fails, then something seriously wrong has occurred. |
| 144 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::PhysicalMemory, 0x100000000) | 152 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::PhysicalMemory, total_size) |
| 145 | .IsSuccess()); | 153 | .IsSuccess()); |
| 146 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Threads, 800).IsSuccess()); | 154 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Threads, 800).IsSuccess()); |
| 147 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Events, 900).IsSuccess()); | 155 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Events, 900).IsSuccess()); |
| 148 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::TransferMemory, 200) | 156 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::TransferMemory, 200) |
| 149 | .IsSuccess()); | 157 | .IsSuccess()); |
| 150 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Sessions, 1133).IsSuccess()); | 158 | ASSERT(system_resource_limit->SetLimitValue(LimitableResource::Sessions, 1133).IsSuccess()); |
| 159 | system_resource_limit->Reserve(LimitableResource::PhysicalMemory, kernel_size); | ||
| 151 | 160 | ||
| 152 | // Derived from recent software updates. The kernel reserves 27MB | ||
| 153 | constexpr u64 kernel_size{0x1b00000}; | ||
| 154 | if (!system_resource_limit->Reserve(LimitableResource::PhysicalMemory, kernel_size)) { | ||
| 155 | UNREACHABLE(); | ||
| 156 | } | ||
| 157 | // Reserve secure applet memory, introduced in firmware 5.0.0 | 161 | // Reserve secure applet memory, introduced in firmware 5.0.0 |
| 158 | constexpr u64 secure_applet_memory_size{0x400000}; | 162 | constexpr u64 secure_applet_memory_size{Common::Size_4_MB}; |
| 159 | ASSERT(system_resource_limit->Reserve(LimitableResource::PhysicalMemory, | 163 | ASSERT(system_resource_limit->Reserve(LimitableResource::PhysicalMemory, |
| 160 | secure_applet_memory_size)); | 164 | secure_applet_memory_size)); |
| 165 | |||
| 166 | // This memory seems to be reserved on hardware, but is not reserved/used by yuzu. | ||
| 167 | // Likely Horizon OS reserved memory | ||
| 168 | // TODO(ameerj): Derive the memory rather than hardcode it. | ||
| 169 | constexpr u64 unknown_reserved_memory{0x2f896000}; | ||
| 170 | ASSERT(system_resource_limit->Reserve(LimitableResource::PhysicalMemory, | ||
| 171 | unknown_reserved_memory)); | ||
| 161 | } | 172 | } |
| 162 | 173 | ||
| 163 | void InitializePreemption(KernelCore& kernel) { | 174 | void InitializePreemption(KernelCore& kernel) { |
| @@ -531,11 +542,7 @@ struct KernelCore::Impl { | |||
| 531 | linear_region_start); | 542 | linear_region_start); |
| 532 | } | 543 | } |
| 533 | 544 | ||
| 534 | void InitializeMemoryLayout() { | 545 | void InitializeMemoryLayout(const KMemoryLayout& memory_layout) { |
| 535 | // Derive the initial memory layout from the emulated board | ||
| 536 | KMemoryLayout memory_layout; | ||
| 537 | DeriveInitialMemoryLayout(memory_layout); | ||
| 538 | |||
| 539 | const auto system_pool = memory_layout.GetKernelSystemPoolRegionPhysicalExtents(); | 546 | const auto system_pool = memory_layout.GetKernelSystemPoolRegionPhysicalExtents(); |
| 540 | const auto applet_pool = memory_layout.GetKernelAppletPoolRegionPhysicalExtents(); | 547 | const auto applet_pool = memory_layout.GetKernelAppletPoolRegionPhysicalExtents(); |
| 541 | const auto application_pool = memory_layout.GetKernelApplicationPoolRegionPhysicalExtents(); | 548 | const auto application_pool = memory_layout.GetKernelApplicationPoolRegionPhysicalExtents(); |
| @@ -578,11 +585,14 @@ struct KernelCore::Impl { | |||
| 578 | system.Kernel(), system.DeviceMemory(), nullptr, {time_phys_addr, time_size / PageSize}, | 585 | system.Kernel(), system.DeviceMemory(), nullptr, {time_phys_addr, time_size / PageSize}, |
| 579 | KMemoryPermission::None, KMemoryPermission::Read, time_phys_addr, time_size, | 586 | KMemoryPermission::None, KMemoryPermission::Read, time_phys_addr, time_size, |
| 580 | "Time:SharedMemory"); | 587 | "Time:SharedMemory"); |
| 588 | } | ||
| 581 | 589 | ||
| 590 | void InitializeSlabHeaps() { | ||
| 582 | // Allocate slab heaps | 591 | // Allocate slab heaps |
| 583 | user_slab_heap_pages = std::make_unique<KSlabHeap<Page>>(); | 592 | user_slab_heap_pages = std::make_unique<KSlabHeap<Page>>(); |
| 584 | 593 | ||
| 585 | constexpr u64 user_slab_heap_size{0x1ef000}; | 594 | // TODO(ameerj): This should be derived, not hardcoded within the kernel |
| 595 | constexpr u64 user_slab_heap_size{0x3de000}; | ||
| 586 | // Reserve slab heaps | 596 | // Reserve slab heaps |
| 587 | ASSERT( | 597 | ASSERT( |
| 588 | system_resource_limit->Reserve(LimitableResource::PhysicalMemory, user_slab_heap_size)); | 598 | system_resource_limit->Reserve(LimitableResource::PhysicalMemory, user_slab_heap_size)); |
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp index 9d5956ead..e35deb8e2 100644 --- a/src/core/hle/kernel/process.cpp +++ b/src/core/hle/kernel/process.cpp | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | #include "common/alignment.h" | 10 | #include "common/alignment.h" |
| 11 | #include "common/assert.h" | 11 | #include "common/assert.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/settings.h" | ||
| 13 | #include "core/core.h" | 14 | #include "core/core.h" |
| 14 | #include "core/device_memory.h" | 15 | #include "core/device_memory.h" |
| 15 | #include "core/file_sys/program_metadata.h" | 16 | #include "core/file_sys/program_metadata.h" |
| @@ -26,7 +27,6 @@ | |||
| 26 | #include "core/hle/kernel/svc_results.h" | 27 | #include "core/hle/kernel/svc_results.h" |
| 27 | #include "core/hle/lock.h" | 28 | #include "core/hle/lock.h" |
| 28 | #include "core/memory.h" | 29 | #include "core/memory.h" |
| 29 | #include "core/settings.h" | ||
| 30 | 30 | ||
| 31 | namespace Kernel { | 31 | namespace Kernel { |
| 32 | namespace { | 32 | namespace { |
| @@ -120,9 +120,7 @@ std::shared_ptr<Process> Process::Create(Core::System& system, std::string name, | |||
| 120 | std::shared_ptr<Process> process = std::make_shared<Process>(system); | 120 | std::shared_ptr<Process> process = std::make_shared<Process>(system); |
| 121 | process->name = std::move(name); | 121 | process->name = std::move(name); |
| 122 | 122 | ||
| 123 | // TODO: This is inaccurate | 123 | process->resource_limit = kernel.GetSystemResourceLimit(); |
| 124 | // The process should hold a reference to the kernel-wide resource limit. | ||
| 125 | process->resource_limit = std::make_shared<KResourceLimit>(kernel, system); | ||
| 126 | process->status = ProcessStatus::Created; | 124 | process->status = ProcessStatus::Created; |
| 127 | process->program_id = 0; | 125 | process->program_id = 0; |
| 128 | process->process_id = type == ProcessType::KernelInternal ? kernel.CreateNewKernelProcessID() | 126 | process->process_id = type == ProcessType::KernelInternal ? kernel.CreateNewKernelProcessID() |
| @@ -160,17 +158,13 @@ void Process::DecrementThreadCount() { | |||
| 160 | } | 158 | } |
| 161 | 159 | ||
| 162 | u64 Process::GetTotalPhysicalMemoryAvailable() const { | 160 | u64 Process::GetTotalPhysicalMemoryAvailable() const { |
| 163 | // TODO: This is expected to always return the application memory pool size after accurately | ||
| 164 | // reserving kernel resources. The current workaround uses a process-local resource limit of | ||
| 165 | // application memory pool size, which is inaccurate. | ||
| 166 | const u64 capacity{resource_limit->GetFreeValue(LimitableResource::PhysicalMemory) + | 161 | const u64 capacity{resource_limit->GetFreeValue(LimitableResource::PhysicalMemory) + |
| 167 | page_table->GetTotalHeapSize() + GetSystemResourceSize() + image_size + | 162 | page_table->GetTotalHeapSize() + GetSystemResourceSize() + image_size + |
| 168 | main_thread_stack_size}; | 163 | main_thread_stack_size}; |
| 169 | 164 | ASSERT(capacity == kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application)); | |
| 170 | if (capacity < memory_usage_capacity) { | 165 | if (capacity < memory_usage_capacity) { |
| 171 | return capacity; | 166 | return capacity; |
| 172 | } | 167 | } |
| 173 | |||
| 174 | return memory_usage_capacity; | 168 | return memory_usage_capacity; |
| 175 | } | 169 | } |
| 176 | 170 | ||
| @@ -272,10 +266,6 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | |||
| 272 | system_resource_size = metadata.GetSystemResourceSize(); | 266 | system_resource_size = metadata.GetSystemResourceSize(); |
| 273 | image_size = code_size; | 267 | image_size = code_size; |
| 274 | 268 | ||
| 275 | // Set initial resource limits | ||
| 276 | resource_limit->SetLimitValue( | ||
| 277 | LimitableResource::PhysicalMemory, | ||
| 278 | kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application)); | ||
| 279 | KScopedResourceReservation memory_reservation(resource_limit, LimitableResource::PhysicalMemory, | 269 | KScopedResourceReservation memory_reservation(resource_limit, LimitableResource::PhysicalMemory, |
| 280 | code_size + system_resource_size); | 270 | code_size + system_resource_size); |
| 281 | if (!memory_reservation.Succeeded()) { | 271 | if (!memory_reservation.Succeeded()) { |
| @@ -324,16 +314,6 @@ ResultCode Process::LoadFromMetadata(const FileSys::ProgramMetadata& metadata, | |||
| 324 | UNREACHABLE(); | 314 | UNREACHABLE(); |
| 325 | } | 315 | } |
| 326 | 316 | ||
| 327 | // Set initial resource limits | ||
| 328 | resource_limit->SetLimitValue( | ||
| 329 | LimitableResource::PhysicalMemory, | ||
| 330 | kernel.MemoryManager().GetSize(KMemoryManager::Pool::Application)); | ||
| 331 | |||
| 332 | resource_limit->SetLimitValue(LimitableResource::Threads, 608); | ||
| 333 | resource_limit->SetLimitValue(LimitableResource::Events, 700); | ||
| 334 | resource_limit->SetLimitValue(LimitableResource::TransferMemory, 128); | ||
| 335 | resource_limit->SetLimitValue(LimitableResource::Sessions, 894); | ||
| 336 | |||
| 337 | // Create TLS region | 317 | // Create TLS region |
| 338 | tls_region_address = CreateTLSRegion(); | 318 | tls_region_address = CreateTLSRegion(); |
| 339 | memory_reservation.Commit(); | 319 | memory_reservation.Commit(); |
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp index fcffc746d..bebb86154 100644 --- a/src/core/hle/kernel/svc.cpp +++ b/src/core/hle/kernel/svc.cpp | |||
| @@ -2156,7 +2156,7 @@ static ResultCode CreateResourceLimit(Core::System& system, Handle* out_handle) | |||
| 2156 | LOG_DEBUG(Kernel_SVC, "called"); | 2156 | LOG_DEBUG(Kernel_SVC, "called"); |
| 2157 | 2157 | ||
| 2158 | auto& kernel = system.Kernel(); | 2158 | auto& kernel = system.Kernel(); |
| 2159 | auto resource_limit = std::make_shared<KResourceLimit>(kernel, system); | 2159 | auto resource_limit = std::make_shared<KResourceLimit>(kernel, system.CoreTiming()); |
| 2160 | 2160 | ||
| 2161 | auto* const current_process = kernel.CurrentProcess(); | 2161 | auto* const current_process = kernel.CurrentProcess(); |
| 2162 | ASSERT(current_process != nullptr); | 2162 | ASSERT(current_process != nullptr); |
diff --git a/src/core/hle/service/acc/profile_manager.cpp b/src/core/hle/service/acc/profile_manager.cpp index 50b2c58e2..de83d82a4 100644 --- a/src/core/hle/service/acc/profile_manager.cpp +++ b/src/core/hle/service/acc/profile_manager.cpp | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | #include <fmt/format.h> | 8 | #include <fmt/format.h> |
| 9 | 9 | ||
| 10 | #include "common/file_util.h" | 10 | #include "common/file_util.h" |
| 11 | #include "common/settings.h" | ||
| 11 | #include "core/hle/service/acc/profile_manager.h" | 12 | #include "core/hle/service/acc/profile_manager.h" |
| 12 | #include "core/settings.h" | ||
| 13 | 13 | ||
| 14 | namespace Service::Account { | 14 | namespace Service::Account { |
| 15 | 15 | ||
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 4374487a3..416c5239a 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <cinttypes> | 7 | #include <cinttypes> |
| 8 | #include <cstring> | 8 | #include <cstring> |
| 9 | #include "audio_core/audio_renderer.h" | 9 | #include "audio_core/audio_renderer.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "core/core.h" | 11 | #include "core/core.h" |
| 11 | #include "core/file_sys/control_metadata.h" | 12 | #include "core/file_sys/control_metadata.h" |
| 12 | #include "core/file_sys/patch_manager.h" | 13 | #include "core/file_sys/patch_manager.h" |
| @@ -41,7 +42,6 @@ | |||
| 41 | #include "core/hle/service/set/set.h" | 42 | #include "core/hle/service/set/set.h" |
| 42 | #include "core/hle/service/sm/sm.h" | 43 | #include "core/hle/service/sm/sm.h" |
| 43 | #include "core/hle/service/vi/vi.h" | 44 | #include "core/hle/service/vi/vi.h" |
| 44 | #include "core/settings.h" | ||
| 45 | 45 | ||
| 46 | namespace Service::AM { | 46 | namespace Service::AM { |
| 47 | 47 | ||
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 0f51e5871..75867e349 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include <vector> | 7 | #include <vector> |
| 8 | 8 | ||
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "core/core.h" | 11 | #include "core/core.h" |
| 11 | #include "core/file_sys/common_funcs.h" | 12 | #include "core/file_sys/common_funcs.h" |
| 12 | #include "core/file_sys/content_archive.h" | 13 | #include "core/file_sys/content_archive.h" |
| @@ -21,7 +22,6 @@ | |||
| 21 | #include "core/hle/kernel/process.h" | 22 | #include "core/hle/kernel/process.h" |
| 22 | #include "core/hle/service/aoc/aoc_u.h" | 23 | #include "core/hle/service/aoc/aoc_u.h" |
| 23 | #include "core/loader/loader.h" | 24 | #include "core/loader/loader.h" |
| 24 | #include "core/settings.h" | ||
| 25 | 25 | ||
| 26 | namespace Service::AOC { | 26 | namespace Service::AOC { |
| 27 | 27 | ||
diff --git a/src/core/hle/service/apm/controller.cpp b/src/core/hle/service/apm/controller.cpp index 03636642b..00c174bb0 100644 --- a/src/core/hle/service/apm/controller.cpp +++ b/src/core/hle/service/apm/controller.cpp | |||
| @@ -7,9 +7,9 @@ | |||
| 7 | #include <utility> | 7 | #include <utility> |
| 8 | 8 | ||
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "core/core_timing.h" | 11 | #include "core/core_timing.h" |
| 11 | #include "core/hle/service/apm/controller.h" | 12 | #include "core/hle/service/apm/controller.h" |
| 12 | #include "core/settings.h" | ||
| 13 | 13 | ||
| 14 | namespace Service::APM { | 14 | namespace Service::APM { |
| 15 | 15 | ||
diff --git a/src/core/hle/service/bcat/backend/boxcat.cpp b/src/core/hle/service/bcat/backend/boxcat.cpp index e43f3f47f..78c047bd2 100644 --- a/src/core/hle/service/bcat/backend/boxcat.cpp +++ b/src/core/hle/service/bcat/backend/boxcat.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/hex_util.h" | 9 | #include "common/hex_util.h" |
| 10 | #include "common/logging/backend.h" | 10 | #include "common/logging/backend.h" |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "core/core.h" | 13 | #include "core/core.h" |
| 13 | #include "core/file_sys/vfs.h" | 14 | #include "core/file_sys/vfs.h" |
| 14 | #include "core/file_sys/vfs_libzip.h" | 15 | #include "core/file_sys/vfs_libzip.h" |
| @@ -16,7 +17,6 @@ | |||
| 16 | #include "core/frontend/applets/error.h" | 17 | #include "core/frontend/applets/error.h" |
| 17 | #include "core/hle/service/am/applets/applets.h" | 18 | #include "core/hle/service/am/applets/applets.h" |
| 18 | #include "core/hle/service/bcat/backend/boxcat.h" | 19 | #include "core/hle/service/bcat/backend/boxcat.h" |
| 19 | #include "core/settings.h" | ||
| 20 | 20 | ||
| 21 | namespace Service::BCAT { | 21 | namespace Service::BCAT { |
| 22 | namespace { | 22 | namespace { |
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp index b68e2c345..c7dd04a6e 100644 --- a/src/core/hle/service/bcat/module.cpp +++ b/src/core/hle/service/bcat/module.cpp | |||
| @@ -7,6 +7,7 @@ | |||
| 7 | #include "backend/boxcat.h" | 7 | #include "backend/boxcat.h" |
| 8 | #include "common/hex_util.h" | 8 | #include "common/hex_util.h" |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "common/string_util.h" | 11 | #include "common/string_util.h" |
| 11 | #include "core/core.h" | 12 | #include "core/core.h" |
| 12 | #include "core/file_sys/vfs.h" | 13 | #include "core/file_sys/vfs.h" |
| @@ -18,7 +19,6 @@ | |||
| 18 | #include "core/hle/service/bcat/bcat.h" | 19 | #include "core/hle/service/bcat/bcat.h" |
| 19 | #include "core/hle/service/bcat/module.h" | 20 | #include "core/hle/service/bcat/module.h" |
| 20 | #include "core/hle/service/filesystem/filesystem.h" | 21 | #include "core/hle/service/filesystem/filesystem.h" |
| 21 | #include "core/settings.h" | ||
| 22 | 22 | ||
| 23 | namespace Service::BCAT { | 23 | namespace Service::BCAT { |
| 24 | 24 | ||
diff --git a/src/core/hle/service/filesystem/filesystem.cpp b/src/core/hle/service/filesystem/filesystem.cpp index b15c737e1..72ad273b2 100644 --- a/src/core/hle/service/filesystem/filesystem.cpp +++ b/src/core/hle/service/filesystem/filesystem.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/file_util.h" | 8 | #include "common/file_util.h" |
| 9 | #include "common/settings.h" | ||
| 9 | #include "core/core.h" | 10 | #include "core/core.h" |
| 10 | #include "core/file_sys/bis_factory.h" | 11 | #include "core/file_sys/bis_factory.h" |
| 11 | #include "core/file_sys/card_image.h" | 12 | #include "core/file_sys/card_image.h" |
| @@ -26,7 +27,6 @@ | |||
| 26 | #include "core/hle/service/filesystem/fsp_pr.h" | 27 | #include "core/hle/service/filesystem/fsp_pr.h" |
| 27 | #include "core/hle/service/filesystem/fsp_srv.h" | 28 | #include "core/hle/service/filesystem/fsp_srv.h" |
| 28 | #include "core/loader/loader.h" | 29 | #include "core/loader/loader.h" |
| 29 | #include "core/settings.h" | ||
| 30 | 30 | ||
| 31 | namespace Service::FileSystem { | 31 | namespace Service::FileSystem { |
| 32 | 32 | ||
diff --git a/src/core/hle/service/hid/controllers/debug_pad.cpp b/src/core/hle/service/hid/controllers/debug_pad.cpp index ad251ed4a..a460f2f79 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.cpp +++ b/src/core/hle/service/hid/controllers/debug_pad.cpp | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/settings.h" | ||
| 7 | #include "core/core_timing.h" | 8 | #include "core/core_timing.h" |
| 8 | #include "core/hle/service/hid/controllers/debug_pad.h" | 9 | #include "core/hle/service/hid/controllers/debug_pad.h" |
| 9 | #include "core/settings.h" | ||
| 10 | 10 | ||
| 11 | namespace Service::HID { | 11 | namespace Service::HID { |
| 12 | 12 | ||
diff --git a/src/core/hle/service/hid/controllers/debug_pad.h b/src/core/hle/service/hid/controllers/debug_pad.h index 555b29d76..0593d7d39 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.h +++ b/src/core/hle/service/hid/controllers/debug_pad.h | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | #include "common/bit_field.h" | 8 | #include "common/bit_field.h" |
| 9 | #include "common/common_funcs.h" | 9 | #include "common/common_funcs.h" |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/settings.h" | ||
| 11 | #include "common/swap.h" | 12 | #include "common/swap.h" |
| 12 | #include "core/frontend/input.h" | 13 | #include "core/frontend/input.h" |
| 13 | #include "core/hle/service/hid/controllers/controller_base.h" | 14 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 14 | #include "core/settings.h" | ||
| 15 | 15 | ||
| 16 | namespace Service::HID { | 16 | namespace Service::HID { |
| 17 | class Controller_DebugPad final : public ControllerBase { | 17 | class Controller_DebugPad final : public ControllerBase { |
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index 93c43a203..155808f6a 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "core/core_timing.h" | 9 | #include "core/core_timing.h" |
| 9 | #include "core/frontend/emu_window.h" | 10 | #include "core/frontend/emu_window.h" |
| 10 | #include "core/hle/service/hid/controllers/gesture.h" | 11 | #include "core/hle/service/hid/controllers/gesture.h" |
| 11 | #include "core/settings.h" | ||
| 12 | 12 | ||
| 13 | namespace Service::HID { | 13 | namespace Service::HID { |
| 14 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00; | 14 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3BA00; |
diff --git a/src/core/hle/service/hid/controllers/keyboard.cpp b/src/core/hle/service/hid/controllers/keyboard.cpp index c4a59147d..18b76038f 100644 --- a/src/core/hle/service/hid/controllers/keyboard.cpp +++ b/src/core/hle/service/hid/controllers/keyboard.cpp | |||
| @@ -4,9 +4,9 @@ | |||
| 4 | 4 | ||
| 5 | #include <cstring> | 5 | #include <cstring> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/settings.h" | ||
| 7 | #include "core/core_timing.h" | 8 | #include "core/core_timing.h" |
| 8 | #include "core/hle/service/hid/controllers/keyboard.h" | 9 | #include "core/hle/service/hid/controllers/keyboard.h" |
| 9 | #include "core/settings.h" | ||
| 10 | 10 | ||
| 11 | namespace Service::HID { | 11 | namespace Service::HID { |
| 12 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; | 12 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x3800; |
diff --git a/src/core/hle/service/hid/controllers/keyboard.h b/src/core/hle/service/hid/controllers/keyboard.h index b5b281752..e72948591 100644 --- a/src/core/hle/service/hid/controllers/keyboard.h +++ b/src/core/hle/service/hid/controllers/keyboard.h | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | #include "common/bit_field.h" | 8 | #include "common/bit_field.h" |
| 9 | #include "common/common_funcs.h" | 9 | #include "common/common_funcs.h" |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/settings.h" | ||
| 11 | #include "common/swap.h" | 12 | #include "common/swap.h" |
| 12 | #include "core/frontend/input.h" | 13 | #include "core/frontend/input.h" |
| 13 | #include "core/hle/service/hid/controllers/controller_base.h" | 14 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 14 | #include "core/settings.h" | ||
| 15 | 15 | ||
| 16 | namespace Service::HID { | 16 | namespace Service::HID { |
| 17 | class Controller_Keyboard final : public ControllerBase { | 17 | class Controller_Keyboard final : public ControllerBase { |
diff --git a/src/core/hle/service/hid/controllers/mouse.h b/src/core/hle/service/hid/controllers/mouse.h index 3b432a36e..0ec0c2b94 100644 --- a/src/core/hle/service/hid/controllers/mouse.h +++ b/src/core/hle/service/hid/controllers/mouse.h | |||
| @@ -7,10 +7,10 @@ | |||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include "common/bit_field.h" | 8 | #include "common/bit_field.h" |
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "common/swap.h" | 11 | #include "common/swap.h" |
| 11 | #include "core/frontend/input.h" | 12 | #include "core/frontend/input.h" |
| 12 | #include "core/hle/service/hid/controllers/controller_base.h" | 13 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 13 | #include "core/settings.h" | ||
| 14 | 14 | ||
| 15 | namespace Service::HID { | 15 | namespace Service::HID { |
| 16 | class Controller_Mouse final : public ControllerBase { | 16 | class Controller_Mouse final : public ControllerBase { |
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index 673db68c7..783386fcf 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/bit_field.h" | 9 | #include "common/bit_field.h" |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "core/core.h" | 13 | #include "core/core.h" |
| 13 | #include "core/core_timing.h" | 14 | #include "core/core_timing.h" |
| 14 | #include "core/frontend/input.h" | 15 | #include "core/frontend/input.h" |
| @@ -17,7 +18,6 @@ | |||
| 17 | #include "core/hle/kernel/k_writable_event.h" | 18 | #include "core/hle/kernel/k_writable_event.h" |
| 18 | #include "core/hle/kernel/kernel.h" | 19 | #include "core/hle/kernel/kernel.h" |
| 19 | #include "core/hle/service/hid/controllers/npad.h" | 20 | #include "core/hle/service/hid/controllers/npad.h" |
| 20 | #include "core/settings.h" | ||
| 21 | 21 | ||
| 22 | namespace Service::HID { | 22 | namespace Service::HID { |
| 23 | constexpr s32 HID_JOYSTICK_MAX = 0x7fff; | 23 | constexpr s32 HID_JOYSTICK_MAX = 0x7fff; |
diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 873a0a1e2..14d0ac067 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h | |||
| @@ -8,10 +8,10 @@ | |||
| 8 | #include <atomic> | 8 | #include <atomic> |
| 9 | #include "common/bit_field.h" | 9 | #include "common/bit_field.h" |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/settings.h" | ||
| 11 | #include "core/frontend/input.h" | 12 | #include "core/frontend/input.h" |
| 12 | #include "core/hle/kernel/object.h" | 13 | #include "core/hle/kernel/object.h" |
| 13 | #include "core/hle/service/hid/controllers/controller_base.h" | 14 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 14 | #include "core/settings.h" | ||
| 15 | 15 | ||
| 16 | namespace Kernel { | 16 | namespace Kernel { |
| 17 | class KEvent; | 17 | class KEvent; |
diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index be60492a4..b5f8077be 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp | |||
| @@ -6,11 +6,11 @@ | |||
| 6 | #include <cstring> | 6 | #include <cstring> |
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | ||
| 9 | #include "core/core_timing.h" | 10 | #include "core/core_timing.h" |
| 10 | #include "core/frontend/emu_window.h" | 11 | #include "core/frontend/emu_window.h" |
| 11 | #include "core/frontend/input.h" | 12 | #include "core/frontend/input.h" |
| 12 | #include "core/hle/service/hid/controllers/touchscreen.h" | 13 | #include "core/hle/service/hid/controllers/touchscreen.h" |
| 13 | #include "core/settings.h" | ||
| 14 | 14 | ||
| 15 | namespace Service::HID { | 15 | namespace Service::HID { |
| 16 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400; | 16 | constexpr std::size_t SHARED_MEMORY_OFFSET = 0x400; |
diff --git a/src/core/hle/service/hid/hid.cpp b/src/core/hle/service/hid/hid.cpp index a1a779cc0..4c1c0ac68 100644 --- a/src/core/hle/service/hid/hid.cpp +++ b/src/core/hle/service/hid/hid.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <array> | 5 | #include <array> |
| 6 | #include "common/common_types.h" | 6 | #include "common/common_types.h" |
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "core/core.h" | 9 | #include "core/core.h" |
| 9 | #include "core/core_timing.h" | 10 | #include "core/core_timing.h" |
| 10 | #include "core/core_timing_util.h" | 11 | #include "core/core_timing_util.h" |
| @@ -23,7 +24,6 @@ | |||
| 23 | #include "core/hle/service/hid/irs.h" | 24 | #include "core/hle/service/hid/irs.h" |
| 24 | #include "core/hle/service/hid/xcd.h" | 25 | #include "core/hle/service/hid/xcd.h" |
| 25 | #include "core/hle/service/service.h" | 26 | #include "core/hle/service/service.h" |
| 26 | #include "core/settings.h" | ||
| 27 | 27 | ||
| 28 | #include "core/hle/service/hid/controllers/controller_base.h" | 28 | #include "core/hle/service/hid/controllers/controller_base.h" |
| 29 | #include "core/hle/service/hid/controllers/debug_pad.h" | 29 | #include "core/hle/service/hid/controllers/debug_pad.h" |
diff --git a/src/core/hle/service/nfc/nfc.cpp b/src/core/hle/service/nfc/nfc.cpp index 6ab35de47..44a5d5789 100644 --- a/src/core/hle/service/nfc/nfc.cpp +++ b/src/core/hle/service/nfc/nfc.cpp | |||
| @@ -5,12 +5,12 @@ | |||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "core/hle/ipc_helpers.h" | 9 | #include "core/hle/ipc_helpers.h" |
| 9 | #include "core/hle/kernel/hle_ipc.h" | 10 | #include "core/hle/kernel/hle_ipc.h" |
| 10 | #include "core/hle/service/nfc/nfc.h" | 11 | #include "core/hle/service/nfc/nfc.h" |
| 11 | #include "core/hle/service/service.h" | 12 | #include "core/hle/service/service.h" |
| 12 | #include "core/hle/service/sm/sm.h" | 13 | #include "core/hle/service/sm/sm.h" |
| 13 | #include "core/settings.h" | ||
| 14 | 14 | ||
| 15 | namespace Service::NFC { | 15 | namespace Service::NFC { |
| 16 | 16 | ||
diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index afb3342d6..9f110df8e 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/settings.h" | ||
| 5 | #include "core/core.h" | 6 | #include "core/core.h" |
| 6 | #include "core/hle/ipc_helpers.h" | 7 | #include "core/hle/ipc_helpers.h" |
| 7 | #include "core/hle/kernel/k_event.h" | 8 | #include "core/hle/kernel/k_event.h" |
| @@ -10,7 +11,6 @@ | |||
| 10 | #include "core/hle/service/nifm/nifm.h" | 11 | #include "core/hle/service/nifm/nifm.h" |
| 11 | #include "core/hle/service/service.h" | 12 | #include "core/hle/service/service.h" |
| 12 | #include "core/network/network.h" | 13 | #include "core/network/network.h" |
| 13 | #include "core/settings.h" | ||
| 14 | 14 | ||
| 15 | namespace Service::NIFM { | 15 | namespace Service::NIFM { |
| 16 | 16 | ||
diff --git a/src/core/hle/service/ns/ns.cpp b/src/core/hle/service/ns/ns.cpp index 5fe7a9189..e373609a1 100644 --- a/src/core/hle/service/ns/ns.cpp +++ b/src/core/hle/service/ns/ns.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "common/settings.h" | ||
| 6 | #include "core/core.h" | 7 | #include "core/core.h" |
| 7 | #include "core/file_sys/control_metadata.h" | 8 | #include "core/file_sys/control_metadata.h" |
| 8 | #include "core/file_sys/patch_manager.h" | 9 | #include "core/file_sys/patch_manager.h" |
| @@ -14,7 +15,6 @@ | |||
| 14 | #include "core/hle/service/ns/ns.h" | 15 | #include "core/hle/service/ns/ns.h" |
| 15 | #include "core/hle/service/ns/pl_u.h" | 16 | #include "core/hle/service/ns/pl_u.h" |
| 16 | #include "core/hle/service/set/set.h" | 17 | #include "core/hle/service/set/set.h" |
| 17 | #include "core/settings.h" | ||
| 18 | 18 | ||
| 19 | namespace Service::NS { | 19 | namespace Service::NS { |
| 20 | 20 | ||
diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index ac2906e5b..539b02bc4 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "common/microprofile.h" | 10 | #include "common/microprofile.h" |
| 11 | #include "common/scope_exit.h" | 11 | #include "common/scope_exit.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "common/thread.h" | 13 | #include "common/thread.h" |
| 13 | #include "core/core.h" | 14 | #include "core/core.h" |
| 14 | #include "core/core_timing.h" | 15 | #include "core/core_timing.h" |
| @@ -23,7 +24,6 @@ | |||
| 23 | #include "core/hle/service/vi/display/vi_display.h" | 24 | #include "core/hle/service/vi/display/vi_display.h" |
| 24 | #include "core/hle/service/vi/layer/vi_layer.h" | 25 | #include "core/hle/service/vi/layer/vi_layer.h" |
| 25 | #include "core/perf_stats.h" | 26 | #include "core/perf_stats.h" |
| 26 | #include "core/settings.h" | ||
| 27 | #include "video_core/renderer_base.h" | 27 | #include "video_core/renderer_base.h" |
| 28 | 28 | ||
| 29 | namespace Service::NVFlinger { | 29 | namespace Service::NVFlinger { |
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index aec399076..41a502d8d 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp | |||
| @@ -6,6 +6,7 @@ | |||
| 6 | #include <fmt/format.h> | 6 | #include <fmt/format.h> |
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | ||
| 9 | #include "common/string_util.h" | 10 | #include "common/string_util.h" |
| 10 | #include "core/core.h" | 11 | #include "core/core.h" |
| 11 | #include "core/hle/ipc.h" | 12 | #include "core/hle/ipc.h" |
| @@ -70,7 +71,6 @@ | |||
| 70 | #include "core/hle/service/vi/vi.h" | 71 | #include "core/hle/service/vi/vi.h" |
| 71 | #include "core/hle/service/wlan/wlan.h" | 72 | #include "core/hle/service/wlan/wlan.h" |
| 72 | #include "core/reporter.h" | 73 | #include "core/reporter.h" |
| 73 | #include "core/settings.h" | ||
| 74 | 74 | ||
| 75 | namespace Service { | 75 | namespace Service { |
| 76 | 76 | ||
diff --git a/src/core/hle/service/set/set.cpp b/src/core/hle/service/set/set.cpp index d953b4303..bc7dc776f 100644 --- a/src/core/hle/service/set/set.cpp +++ b/src/core/hle/service/set/set.cpp | |||
| @@ -6,9 +6,9 @@ | |||
| 6 | #include <array> | 6 | #include <array> |
| 7 | #include <chrono> | 7 | #include <chrono> |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | ||
| 9 | #include "core/hle/ipc_helpers.h" | 10 | #include "core/hle/ipc_helpers.h" |
| 10 | #include "core/hle/service/set/set.h" | 11 | #include "core/hle/service/set/set.h" |
| 11 | #include "core/settings.h" | ||
| 12 | 12 | ||
| 13 | namespace Service::Set { | 13 | namespace Service::Set { |
| 14 | namespace { | 14 | namespace { |
diff --git a/src/core/hle/service/spl/module.cpp b/src/core/hle/service/spl/module.cpp index 6903dd534..b1552c3f0 100644 --- a/src/core/hle/service/spl/module.cpp +++ b/src/core/hle/service/spl/module.cpp | |||
| @@ -9,11 +9,11 @@ | |||
| 9 | #include <functional> | 9 | #include <functional> |
| 10 | #include <vector> | 10 | #include <vector> |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "core/hle/ipc_helpers.h" | 13 | #include "core/hle/ipc_helpers.h" |
| 13 | #include "core/hle/service/spl/csrng.h" | 14 | #include "core/hle/service/spl/csrng.h" |
| 14 | #include "core/hle/service/spl/module.h" | 15 | #include "core/hle/service/spl/module.h" |
| 15 | #include "core/hle/service/spl/spl.h" | 16 | #include "core/hle/service/spl/spl.h" |
| 16 | #include "core/settings.h" | ||
| 17 | 17 | ||
| 18 | namespace Service::SPL { | 18 | namespace Service::SPL { |
| 19 | 19 | ||
diff --git a/src/core/hle/service/time/time_manager.cpp b/src/core/hle/service/time/time_manager.cpp index 51becd074..f89c5aaad 100644 --- a/src/core/hle/service/time/time_manager.cpp +++ b/src/core/hle/service/time/time_manager.cpp | |||
| @@ -5,12 +5,12 @@ | |||
| 5 | #include <chrono> | 5 | #include <chrono> |
| 6 | #include <ctime> | 6 | #include <ctime> |
| 7 | 7 | ||
| 8 | #include "common/settings.h" | ||
| 8 | #include "common/time_zone.h" | 9 | #include "common/time_zone.h" |
| 9 | #include "core/hle/service/time/ephemeral_network_system_clock_context_writer.h" | 10 | #include "core/hle/service/time/ephemeral_network_system_clock_context_writer.h" |
| 10 | #include "core/hle/service/time/local_system_clock_context_writer.h" | 11 | #include "core/hle/service/time/local_system_clock_context_writer.h" |
| 11 | #include "core/hle/service/time/network_system_clock_context_writer.h" | 12 | #include "core/hle/service/time/network_system_clock_context_writer.h" |
| 12 | #include "core/hle/service/time/time_manager.h" | 13 | #include "core/hle/service/time/time_manager.h" |
| 13 | #include "core/settings.h" | ||
| 14 | 14 | ||
| 15 | namespace Service::Time { | 15 | namespace Service::Time { |
| 16 | 16 | ||
diff --git a/src/core/hle/service/time/time_zone_content_manager.cpp b/src/core/hle/service/time/time_zone_content_manager.cpp index 4177d0a41..3c8e71a3c 100644 --- a/src/core/hle/service/time/time_zone_content_manager.cpp +++ b/src/core/hle/service/time/time_zone_content_manager.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <sstream> | 5 | #include <sstream> |
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "common/time_zone.h" | 9 | #include "common/time_zone.h" |
| 9 | #include "core/core.h" | 10 | #include "core/core.h" |
| 10 | #include "core/file_sys/content_archive.h" | 11 | #include "core/file_sys/content_archive.h" |
| @@ -15,7 +16,6 @@ | |||
| 15 | #include "core/hle/service/filesystem/filesystem.h" | 16 | #include "core/hle/service/filesystem/filesystem.h" |
| 16 | #include "core/hle/service/time/time_manager.h" | 17 | #include "core/hle/service/time/time_manager.h" |
| 17 | #include "core/hle/service/time/time_zone_content_manager.h" | 18 | #include "core/hle/service/time/time_zone_content_manager.h" |
| 18 | #include "core/settings.h" | ||
| 19 | 19 | ||
| 20 | namespace Service::Time::TimeZone { | 20 | namespace Service::Time::TimeZone { |
| 21 | 21 | ||
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index a1a7ac987..348360b51 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | #include "common/common_funcs.h" | 15 | #include "common/common_funcs.h" |
| 16 | #include "common/logging/log.h" | 16 | #include "common/logging/log.h" |
| 17 | #include "common/math_util.h" | 17 | #include "common/math_util.h" |
| 18 | #include "common/settings.h" | ||
| 18 | #include "common/swap.h" | 19 | #include "common/swap.h" |
| 19 | #include "core/core_timing.h" | 20 | #include "core/core_timing.h" |
| 20 | #include "core/hle/ipc_helpers.h" | 21 | #include "core/hle/ipc_helpers.h" |
| @@ -30,7 +31,6 @@ | |||
| 30 | #include "core/hle/service/vi/vi_m.h" | 31 | #include "core/hle/service/vi/vi_m.h" |
| 31 | #include "core/hle/service/vi/vi_s.h" | 32 | #include "core/hle/service/vi/vi_s.h" |
| 32 | #include "core/hle/service/vi/vi_u.h" | 33 | #include "core/hle/service/vi/vi_u.h" |
| 33 | #include "core/settings.h" | ||
| 34 | 34 | ||
| 35 | namespace Service::VI { | 35 | namespace Service::VI { |
| 36 | 36 | ||
diff --git a/src/core/loader/nro.cpp b/src/core/loader/nro.cpp index 14618cb40..0115ed0c4 100644 --- a/src/core/loader/nro.cpp +++ b/src/core/loader/nro.cpp | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include "common/common_types.h" | 9 | #include "common/common_types.h" |
| 10 | #include "common/file_util.h" | 10 | #include "common/file_util.h" |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "common/swap.h" | 13 | #include "common/swap.h" |
| 13 | #include "core/core.h" | 14 | #include "core/core.h" |
| 14 | #include "core/file_sys/control_metadata.h" | 15 | #include "core/file_sys/control_metadata.h" |
| @@ -22,7 +23,6 @@ | |||
| 22 | #include "core/loader/nro.h" | 23 | #include "core/loader/nro.h" |
| 23 | #include "core/loader/nso.h" | 24 | #include "core/loader/nso.h" |
| 24 | #include "core/memory.h" | 25 | #include "core/memory.h" |
| 25 | #include "core/settings.h" | ||
| 26 | 26 | ||
| 27 | namespace Loader { | 27 | namespace Loader { |
| 28 | 28 | ||
diff --git a/src/core/loader/nso.cpp b/src/core/loader/nso.cpp index cbd048695..0c83dd666 100644 --- a/src/core/loader/nso.cpp +++ b/src/core/loader/nso.cpp | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include "common/hex_util.h" | 11 | #include "common/hex_util.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/lz4_compression.h" | 13 | #include "common/lz4_compression.h" |
| 14 | #include "common/settings.h" | ||
| 14 | #include "common/swap.h" | 15 | #include "common/swap.h" |
| 15 | #include "core/core.h" | 16 | #include "core/core.h" |
| 16 | #include "core/file_sys/patch_manager.h" | 17 | #include "core/file_sys/patch_manager.h" |
| @@ -20,7 +21,6 @@ | |||
| 20 | #include "core/hle/kernel/process.h" | 21 | #include "core/hle/kernel/process.h" |
| 21 | #include "core/loader/nso.h" | 22 | #include "core/loader/nso.h" |
| 22 | #include "core/memory.h" | 23 | #include "core/memory.h" |
| 23 | #include "core/settings.h" | ||
| 24 | 24 | ||
| 25 | namespace Loader { | 25 | namespace Loader { |
| 26 | namespace { | 26 | namespace { |
diff --git a/src/core/perf_stats.cpp b/src/core/perf_stats.cpp index b93396a80..c92337079 100644 --- a/src/core/perf_stats.cpp +++ b/src/core/perf_stats.cpp | |||
| @@ -13,8 +13,8 @@ | |||
| 13 | #include <fmt/format.h> | 13 | #include <fmt/format.h> |
| 14 | #include "common/file_util.h" | 14 | #include "common/file_util.h" |
| 15 | #include "common/math_util.h" | 15 | #include "common/math_util.h" |
| 16 | #include "common/settings.h" | ||
| 16 | #include "core/perf_stats.h" | 17 | #include "core/perf_stats.h" |
| 17 | #include "core/settings.h" | ||
| 18 | 18 | ||
| 19 | using namespace std::chrono_literals; | 19 | using namespace std::chrono_literals; |
| 20 | using DoubleSecs = std::chrono::duration<double, std::chrono::seconds::period>; | 20 | using DoubleSecs = std::chrono::duration<double, std::chrono::seconds::period>; |
diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index 74fb32814..311d4dda8 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include "common/file_util.h" | 14 | #include "common/file_util.h" |
| 15 | #include "common/hex_util.h" | 15 | #include "common/hex_util.h" |
| 16 | #include "common/scm_rev.h" | 16 | #include "common/scm_rev.h" |
| 17 | #include "common/settings.h" | ||
| 17 | #include "core/arm/arm_interface.h" | 18 | #include "core/arm/arm_interface.h" |
| 18 | #include "core/core.h" | 19 | #include "core/core.h" |
| 19 | #include "core/hle/kernel/hle_ipc.h" | 20 | #include "core/hle/kernel/hle_ipc.h" |
| @@ -22,7 +23,6 @@ | |||
| 22 | #include "core/hle/result.h" | 23 | #include "core/hle/result.h" |
| 23 | #include "core/memory.h" | 24 | #include "core/memory.h" |
| 24 | #include "core/reporter.h" | 25 | #include "core/reporter.h" |
| 25 | #include "core/settings.h" | ||
| 26 | 26 | ||
| 27 | namespace { | 27 | namespace { |
| 28 | 28 | ||
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index d11b15f38..6dcff5400 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -12,10 +12,10 @@ | |||
| 12 | #include "common/file_util.h" | 12 | #include "common/file_util.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | 14 | ||
| 15 | #include "common/settings.h" | ||
| 15 | #include "core/file_sys/control_metadata.h" | 16 | #include "core/file_sys/control_metadata.h" |
| 16 | #include "core/file_sys/patch_manager.h" | 17 | #include "core/file_sys/patch_manager.h" |
| 17 | #include "core/loader/loader.h" | 18 | #include "core/loader/loader.h" |
| 18 | #include "core/settings.h" | ||
| 19 | #include "core/telemetry_session.h" | 19 | #include "core/telemetry_session.h" |
| 20 | 20 | ||
| 21 | #ifdef ENABLE_WEB_SERVICE | 21 | #ifdef ENABLE_WEB_SERVICE |
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 38ab31898..c3cfe7efc 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -9,8 +9,6 @@ add_library(input_common STATIC | |||
| 9 | motion_from_button.h | 9 | motion_from_button.h |
| 10 | motion_input.cpp | 10 | motion_input.cpp |
| 11 | motion_input.h | 11 | motion_input.h |
| 12 | settings.cpp | ||
| 13 | settings.h | ||
| 14 | touch_from_button.cpp | 12 | touch_from_button.cpp |
| 15 | touch_from_button.h | 13 | touch_from_button.h |
| 16 | gcadapter/gc_adapter.cpp | 14 | gcadapter/gc_adapter.cpp |
diff --git a/src/input_common/analog_from_button.cpp b/src/input_common/analog_from_button.cpp index 770893687..f8ec179d0 100755 --- a/src/input_common/analog_from_button.cpp +++ b/src/input_common/analog_from_button.cpp | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <cmath> | 7 | #include <cmath> |
| 8 | #include <thread> | 8 | #include <thread> |
| 9 | #include "common/math_util.h" | 9 | #include "common/math_util.h" |
| 10 | #include "core/settings.h" | 10 | #include "common/settings.h" |
| 11 | #include "input_common/analog_from_button.h" | 11 | #include "input_common/analog_from_button.h" |
| 12 | 12 | ||
| 13 | namespace InputCommon { | 13 | namespace InputCommon { |
diff --git a/src/input_common/gcadapter/gc_adapter.cpp b/src/input_common/gcadapter/gc_adapter.cpp index d80195c82..ec3167bea 100644 --- a/src/input_common/gcadapter/gc_adapter.cpp +++ b/src/input_common/gcadapter/gc_adapter.cpp | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | 16 | ||
| 17 | #include "common/logging/log.h" | 17 | #include "common/logging/log.h" |
| 18 | #include "common/param_package.h" | 18 | #include "common/param_package.h" |
| 19 | #include "common/settings_input.h" | ||
| 19 | #include "input_common/gcadapter/gc_adapter.h" | 20 | #include "input_common/gcadapter/gc_adapter.h" |
| 20 | #include "input_common/settings.h" | ||
| 21 | 21 | ||
| 22 | namespace GCAdapter { | 22 | namespace GCAdapter { |
| 23 | 23 | ||
diff --git a/src/input_common/mouse/mouse_input.cpp b/src/input_common/mouse/mouse_input.cpp index 329e416c7..fff1c6b45 100644 --- a/src/input_common/mouse/mouse_input.cpp +++ b/src/input_common/mouse/mouse_input.cpp | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | // Licensed under GPLv2+ | 2 | // Licensed under GPLv2+ |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "core/settings.h" | 5 | #include "common/settings.h" |
| 6 | #include "input_common/mouse/mouse_input.h" | 6 | #include "input_common/mouse/mouse_input.h" |
| 7 | 7 | ||
| 8 | namespace MouseInput { | 8 | namespace MouseInput { |
diff --git a/src/input_common/mouse/mouse_poller.cpp b/src/input_common/mouse/mouse_poller.cpp index 0e1db54fb..d96104a4e 100644 --- a/src/input_common/mouse/mouse_poller.cpp +++ b/src/input_common/mouse/mouse_poller.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | #include <mutex> | 5 | #include <mutex> |
| 6 | #include <utility> | 6 | #include <utility> |
| 7 | 7 | ||
| 8 | #include "common/settings.h" | ||
| 8 | #include "common/threadsafe_queue.h" | 9 | #include "common/threadsafe_queue.h" |
| 9 | #include "core/settings.h" | ||
| 10 | #include "input_common/mouse/mouse_input.h" | 10 | #include "input_common/mouse/mouse_input.h" |
| 11 | #include "input_common/mouse/mouse_poller.h" | 11 | #include "input_common/mouse/mouse_poller.h" |
| 12 | 12 | ||
diff --git a/src/input_common/sdl/sdl_impl.cpp b/src/input_common/sdl/sdl_impl.cpp index f67de37e3..8bca71731 100644 --- a/src/input_common/sdl/sdl_impl.cpp +++ b/src/input_common/sdl/sdl_impl.cpp | |||
| @@ -20,11 +20,11 @@ | |||
| 20 | #include <SDL.h> | 20 | #include <SDL.h> |
| 21 | #include "common/logging/log.h" | 21 | #include "common/logging/log.h" |
| 22 | #include "common/param_package.h" | 22 | #include "common/param_package.h" |
| 23 | #include "common/settings_input.h" | ||
| 23 | #include "common/threadsafe_queue.h" | 24 | #include "common/threadsafe_queue.h" |
| 24 | #include "core/frontend/input.h" | 25 | #include "core/frontend/input.h" |
| 25 | #include "input_common/motion_input.h" | 26 | #include "input_common/motion_input.h" |
| 26 | #include "input_common/sdl/sdl_impl.h" | 27 | #include "input_common/sdl/sdl_impl.h" |
| 27 | #include "input_common/settings.h" | ||
| 28 | 28 | ||
| 29 | namespace InputCommon::SDL { | 29 | namespace InputCommon::SDL { |
| 30 | 30 | ||
diff --git a/src/input_common/touch_from_button.cpp b/src/input_common/touch_from_button.cpp index ffbe4f2ed..e94ba197b 100644 --- a/src/input_common/touch_from_button.cpp +++ b/src/input_common/touch_from_button.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/settings.h" | ||
| 5 | #include "core/frontend/framebuffer_layout.h" | 6 | #include "core/frontend/framebuffer_layout.h" |
| 6 | #include "core/settings.h" | ||
| 7 | #include "input_common/touch_from_button.h" | 7 | #include "input_common/touch_from_button.h" |
| 8 | 8 | ||
| 9 | namespace InputCommon { | 9 | namespace InputCommon { |
diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index e72df924b..8a38a380d 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include <thread> | 9 | #include <thread> |
| 10 | #include <boost/asio.hpp> | 10 | #include <boost/asio.hpp> |
| 11 | #include "common/logging/log.h" | 11 | #include "common/logging/log.h" |
| 12 | #include "core/settings.h" | 12 | #include "common/settings.h" |
| 13 | #include "input_common/udp/client.h" | 13 | #include "input_common/udp/client.h" |
| 14 | #include "input_common/udp/protocol.h" | 14 | #include "input_common/udp/protocol.h" |
| 15 | 15 | ||
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h index 4de1e37e5..32dcbd693 100644 --- a/src/video_core/buffer_cache/buffer_cache.h +++ b/src/video_core/buffer_cache/buffer_cache.h | |||
| @@ -20,8 +20,8 @@ | |||
| 20 | #include "common/div_ceil.h" | 20 | #include "common/div_ceil.h" |
| 21 | #include "common/microprofile.h" | 21 | #include "common/microprofile.h" |
| 22 | #include "common/scope_exit.h" | 22 | #include "common/scope_exit.h" |
| 23 | #include "common/settings.h" | ||
| 23 | #include "core/memory.h" | 24 | #include "core/memory.h" |
| 24 | #include "core/settings.h" | ||
| 25 | #include "video_core/buffer_cache/buffer_base.h" | 25 | #include "video_core/buffer_cache/buffer_base.h" |
| 26 | #include "video_core/delayed_destruction_ring.h" | 26 | #include "video_core/delayed_destruction_ring.h" |
| 27 | #include "video_core/dirty_flags.h" | 27 | #include "video_core/dirty_flags.h" |
diff --git a/src/video_core/engines/engine_interface.h b/src/video_core/engines/engine_interface.h index 18a9db7e6..c7ffd68c5 100644 --- a/src/video_core/engines/engine_interface.h +++ b/src/video_core/engines/engine_interface.h | |||
| @@ -4,13 +4,14 @@ | |||
| 4 | 4 | ||
| 5 | #pragma once | 5 | #pragma once |
| 6 | 6 | ||
| 7 | #include <type_traits> | ||
| 8 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 9 | 8 | ||
| 10 | namespace Tegra::Engines { | 9 | namespace Tegra::Engines { |
| 11 | 10 | ||
| 12 | class EngineInterface { | 11 | class EngineInterface { |
| 13 | public: | 12 | public: |
| 13 | virtual ~EngineInterface() = default; | ||
| 14 | |||
| 14 | /// Write the value to the register identified by method. | 15 | /// Write the value to the register identified by method. |
| 15 | virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0; | 16 | virtual void CallMethod(u32 method, u32 method_argument, bool is_last_call) = 0; |
| 16 | 17 | ||
diff --git a/src/video_core/engines/fermi_2d.h b/src/video_core/engines/fermi_2d.h index c808a577d..a4170ffff 100644 --- a/src/video_core/engines/fermi_2d.h +++ b/src/video_core/engines/fermi_2d.h | |||
| @@ -35,7 +35,7 @@ namespace Tegra::Engines { | |||
| 35 | class Fermi2D final : public EngineInterface { | 35 | class Fermi2D final : public EngineInterface { |
| 36 | public: | 36 | public: |
| 37 | explicit Fermi2D(); | 37 | explicit Fermi2D(); |
| 38 | ~Fermi2D(); | 38 | ~Fermi2D() override; |
| 39 | 39 | ||
| 40 | /// Binds a rasterizer to this engine. | 40 | /// Binds a rasterizer to this engine. |
| 41 | void BindRasterizer(VideoCore::RasterizerInterface* rasterizer); | 41 | void BindRasterizer(VideoCore::RasterizerInterface* rasterizer); |
diff --git a/src/video_core/engines/kepler_memory.h b/src/video_core/engines/kepler_memory.h index 19808a5c6..0d8ea09a9 100644 --- a/src/video_core/engines/kepler_memory.h +++ b/src/video_core/engines/kepler_memory.h | |||
| @@ -36,7 +36,7 @@ namespace Tegra::Engines { | |||
| 36 | class KeplerMemory final : public EngineInterface { | 36 | class KeplerMemory final : public EngineInterface { |
| 37 | public: | 37 | public: |
| 38 | explicit KeplerMemory(Core::System& system_, MemoryManager& memory_manager); | 38 | explicit KeplerMemory(Core::System& system_, MemoryManager& memory_manager); |
| 39 | ~KeplerMemory(); | 39 | ~KeplerMemory() override; |
| 40 | 40 | ||
| 41 | /// Write the value to the register identified by method. | 41 | /// Write the value to the register identified by method. |
| 42 | void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; | 42 | void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; |
diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index a2f19559f..2ee980bab 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #include "common/assert.h" | 5 | #include "common/assert.h" |
| 6 | #include "common/logging/log.h" | 6 | #include "common/logging/log.h" |
| 7 | #include "common/settings.h" | ||
| 7 | #include "core/core.h" | 8 | #include "core/core.h" |
| 8 | #include "core/settings.h" | ||
| 9 | #include "video_core/engines/maxwell_3d.h" | 9 | #include "video_core/engines/maxwell_3d.h" |
| 10 | #include "video_core/engines/maxwell_dma.h" | 10 | #include "video_core/engines/maxwell_dma.h" |
| 11 | #include "video_core/memory_manager.h" | 11 | #include "video_core/memory_manager.h" |
diff --git a/src/video_core/engines/maxwell_dma.h b/src/video_core/engines/maxwell_dma.h index 3c59eeb13..c77f02a22 100644 --- a/src/video_core/engines/maxwell_dma.h +++ b/src/video_core/engines/maxwell_dma.h | |||
| @@ -188,7 +188,7 @@ public: | |||
| 188 | static_assert(sizeof(RemapConst) == 12); | 188 | static_assert(sizeof(RemapConst) == 12); |
| 189 | 189 | ||
| 190 | explicit MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_); | 190 | explicit MaxwellDMA(Core::System& system_, MemoryManager& memory_manager_); |
| 191 | ~MaxwellDMA(); | 191 | ~MaxwellDMA() override; |
| 192 | 192 | ||
| 193 | /// Write the value to the register identified by method. | 193 | /// Write the value to the register identified by method. |
| 194 | void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; | 194 | void CallMethod(u32 method, u32 method_argument, bool is_last_call) override; |
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 009c6f574..9bdb282d2 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -6,13 +6,13 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/microprofile.h" | 8 | #include "common/microprofile.h" |
| 9 | #include "common/settings.h" | ||
| 9 | #include "core/core.h" | 10 | #include "core/core.h" |
| 10 | #include "core/core_timing.h" | 11 | #include "core/core_timing.h" |
| 11 | #include "core/core_timing_util.h" | 12 | #include "core/core_timing_util.h" |
| 12 | #include "core/frontend/emu_window.h" | 13 | #include "core/frontend/emu_window.h" |
| 13 | #include "core/hardware_interrupt_manager.h" | 14 | #include "core/hardware_interrupt_manager.h" |
| 14 | #include "core/memory.h" | 15 | #include "core/memory.h" |
| 15 | #include "core/settings.h" | ||
| 16 | #include "video_core/engines/fermi_2d.h" | 16 | #include "video_core/engines/fermi_2d.h" |
| 17 | #include "video_core/engines/kepler_compute.h" | 17 | #include "video_core/engines/kepler_compute.h" |
| 18 | #include "video_core/engines/kepler_memory.h" | 18 | #include "video_core/engines/kepler_memory.h" |
diff --git a/src/video_core/gpu_thread.cpp b/src/video_core/gpu_thread.cpp index 7addfbc7b..cd1fbb9bf 100644 --- a/src/video_core/gpu_thread.cpp +++ b/src/video_core/gpu_thread.cpp | |||
| @@ -5,10 +5,10 @@ | |||
| 5 | #include "common/assert.h" | 5 | #include "common/assert.h" |
| 6 | #include "common/microprofile.h" | 6 | #include "common/microprofile.h" |
| 7 | #include "common/scope_exit.h" | 7 | #include "common/scope_exit.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "common/thread.h" | 9 | #include "common/thread.h" |
| 9 | #include "core/core.h" | 10 | #include "core/core.h" |
| 10 | #include "core/frontend/emu_window.h" | 11 | #include "core/frontend/emu_window.h" |
| 11 | #include "core/settings.h" | ||
| 12 | #include "video_core/dma_pusher.h" | 12 | #include "video_core/dma_pusher.h" |
| 13 | #include "video_core/gpu.h" | 13 | #include "video_core/gpu.h" |
| 14 | #include "video_core/gpu_thread.h" | 14 | #include "video_core/gpu_thread.h" |
diff --git a/src/video_core/macro/macro.cpp b/src/video_core/macro/macro.cpp index cd21a2112..d7fabe605 100644 --- a/src/video_core/macro/macro.cpp +++ b/src/video_core/macro/macro.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <boost/container_hash/hash.hpp> | 6 | #include <boost/container_hash/hash.hpp> |
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "core/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "video_core/engines/maxwell_3d.h" | 10 | #include "video_core/engines/maxwell_3d.h" |
| 11 | #include "video_core/macro/macro.h" | 11 | #include "video_core/macro/macro.h" |
| 12 | #include "video_core/macro/macro_hle.h" | 12 | #include "video_core/macro/macro_hle.h" |
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index 203f2af05..aac851253 100644 --- a/src/video_core/query_cache.h +++ b/src/video_core/query_cache.h | |||
| @@ -16,8 +16,8 @@ | |||
| 16 | #include <vector> | 16 | #include <vector> |
| 17 | 17 | ||
| 18 | #include "common/assert.h" | 18 | #include "common/assert.h" |
| 19 | #include "common/settings.h" | ||
| 19 | #include "core/core.h" | 20 | #include "core/core.h" |
| 20 | #include "core/settings.h" | ||
| 21 | #include "video_core/engines/maxwell_3d.h" | 21 | #include "video_core/engines/maxwell_3d.h" |
| 22 | #include "video_core/gpu.h" | 22 | #include "video_core/gpu.h" |
| 23 | #include "video_core/memory_manager.h" | 23 | #include "video_core/memory_manager.h" |
| @@ -208,9 +208,9 @@ public: | |||
| 208 | private: | 208 | private: |
| 209 | /// Flushes a memory range to guest memory and removes it from the cache. | 209 | /// Flushes a memory range to guest memory and removes it from the cache. |
| 210 | void FlushAndRemoveRegion(VAddr addr, std::size_t size) { | 210 | void FlushAndRemoveRegion(VAddr addr, std::size_t size) { |
| 211 | const u64 addr_begin = static_cast<u64>(addr); | 211 | const u64 addr_begin = addr; |
| 212 | const u64 addr_end = addr_begin + static_cast<u64>(size); | 212 | const u64 addr_end = addr_begin + size; |
| 213 | const auto in_range = [addr_begin, addr_end](CachedQuery& query) { | 213 | const auto in_range = [addr_begin, addr_end](const CachedQuery& query) { |
| 214 | const u64 cache_begin = query.GetCpuAddr(); | 214 | const u64 cache_begin = query.GetCpuAddr(); |
| 215 | const u64 cache_end = cache_begin + query.SizeInBytes(); | 215 | const u64 cache_end = cache_begin + query.SizeInBytes(); |
| 216 | return cache_begin < addr_end && addr_begin < cache_end; | 216 | return cache_begin < addr_end && addr_begin < cache_end; |
| @@ -230,8 +230,7 @@ private: | |||
| 230 | rasterizer.UpdatePagesCachedCount(query.GetCpuAddr(), query.SizeInBytes(), -1); | 230 | rasterizer.UpdatePagesCachedCount(query.GetCpuAddr(), query.SizeInBytes(), -1); |
| 231 | query.Flush(); | 231 | query.Flush(); |
| 232 | } | 232 | } |
| 233 | contents.erase(std::remove_if(std::begin(contents), std::end(contents), in_range), | 233 | std::erase_if(contents, in_range); |
| 234 | std::end(contents)); | ||
| 235 | } | 234 | } |
| 236 | } | 235 | } |
| 237 | 236 | ||
diff --git a/src/video_core/renderer_base.cpp b/src/video_core/renderer_base.cpp index a93a1732c..c9a360aaf 100644 --- a/src/video_core/renderer_base.cpp +++ b/src/video_core/renderer_base.cpp | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "common/settings.h" | ||
| 6 | #include "core/frontend/emu_window.h" | 7 | #include "core/frontend/emu_window.h" |
| 7 | #include "core/settings.h" | ||
| 8 | #include "video_core/renderer_base.h" | 8 | #include "video_core/renderer_base.h" |
| 9 | 9 | ||
| 10 | namespace VideoCore { | 10 | namespace VideoCore { |
diff --git a/src/video_core/renderer_opengl/gl_device.cpp b/src/video_core/renderer_opengl/gl_device.cpp index 5776fccdc..b113f54db 100644 --- a/src/video_core/renderer_opengl/gl_device.cpp +++ b/src/video_core/renderer_opengl/gl_device.cpp | |||
| @@ -16,7 +16,7 @@ | |||
| 16 | 16 | ||
| 17 | #include "common/logging/log.h" | 17 | #include "common/logging/log.h" |
| 18 | #include "common/scope_exit.h" | 18 | #include "common/scope_exit.h" |
| 19 | #include "core/settings.h" | 19 | #include "common/settings.h" |
| 20 | #include "video_core/renderer_opengl/gl_device.h" | 20 | #include "video_core/renderer_opengl/gl_device.h" |
| 21 | #include "video_core/renderer_opengl/gl_resource_manager.h" | 21 | #include "video_core/renderer_opengl/gl_resource_manager.h" |
| 22 | 22 | ||
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 4610fd160..0863904e9 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp | |||
| @@ -17,10 +17,10 @@ | |||
| 17 | #include "common/math_util.h" | 17 | #include "common/math_util.h" |
| 18 | #include "common/microprofile.h" | 18 | #include "common/microprofile.h" |
| 19 | #include "common/scope_exit.h" | 19 | #include "common/scope_exit.h" |
| 20 | #include "common/settings.h" | ||
| 20 | #include "core/core.h" | 21 | #include "core/core.h" |
| 21 | #include "core/hle/kernel/process.h" | 22 | #include "core/hle/kernel/process.h" |
| 22 | #include "core/memory.h" | 23 | #include "core/memory.h" |
| 23 | #include "core/settings.h" | ||
| 24 | #include "video_core/engines/kepler_compute.h" | 24 | #include "video_core/engines/kepler_compute.h" |
| 25 | #include "video_core/engines/maxwell_3d.h" | 25 | #include "video_core/engines/maxwell_3d.h" |
| 26 | #include "video_core/engines/shader_type.h" | 26 | #include "video_core/engines/shader_type.h" |
diff --git a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp index 955b2abc4..97fb11ac6 100644 --- a/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp +++ b/src/video_core/renderer_opengl/gl_shader_disk_cache.cpp | |||
| @@ -12,10 +12,10 @@ | |||
| 12 | #include "common/file_util.h" | 12 | #include "common/file_util.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/scm_rev.h" | 14 | #include "common/scm_rev.h" |
| 15 | #include "common/settings.h" | ||
| 15 | #include "common/zstd_compression.h" | 16 | #include "common/zstd_compression.h" |
| 16 | #include "core/core.h" | 17 | #include "core/core.h" |
| 17 | #include "core/hle/kernel/process.h" | 18 | #include "core/hle/kernel/process.h" |
| 18 | #include "core/settings.h" | ||
| 19 | #include "video_core/engines/shader_type.h" | 19 | #include "video_core/engines/shader_type.h" |
| 20 | #include "video_core/renderer_opengl/gl_shader_cache.h" | 20 | #include "video_core/renderer_opengl/gl_shader_cache.h" |
| 21 | #include "video_core/renderer_opengl/gl_shader_disk_cache.h" | 21 | #include "video_core/renderer_opengl/gl_shader_disk_cache.h" |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 9d2acd4d9..cc2e499f9 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -13,13 +13,13 @@ | |||
| 13 | #include "common/assert.h" | 13 | #include "common/assert.h" |
| 14 | #include "common/logging/log.h" | 14 | #include "common/logging/log.h" |
| 15 | #include "common/microprofile.h" | 15 | #include "common/microprofile.h" |
| 16 | #include "common/settings.h" | ||
| 16 | #include "common/telemetry.h" | 17 | #include "common/telemetry.h" |
| 17 | #include "core/core.h" | 18 | #include "core/core.h" |
| 18 | #include "core/core_timing.h" | 19 | #include "core/core_timing.h" |
| 19 | #include "core/frontend/emu_window.h" | 20 | #include "core/frontend/emu_window.h" |
| 20 | #include "core/memory.h" | 21 | #include "core/memory.h" |
| 21 | #include "core/perf_stats.h" | 22 | #include "core/perf_stats.h" |
| 22 | #include "core/settings.h" | ||
| 23 | #include "core/telemetry_session.h" | 23 | #include "core/telemetry_session.h" |
| 24 | #include "video_core/host_shaders/opengl_present_frag.h" | 24 | #include "video_core/host_shaders/opengl_present_frag.h" |
| 25 | #include "video_core/host_shaders/opengl_present_vert.h" | 25 | #include "video_core/host_shaders/opengl_present_vert.h" |
diff --git a/src/video_core/renderer_vulkan/renderer_vulkan.cpp b/src/video_core/renderer_vulkan/renderer_vulkan.cpp index 14e5f36e2..2e0cf4232 100644 --- a/src/video_core/renderer_vulkan/renderer_vulkan.cpp +++ b/src/video_core/renderer_vulkan/renderer_vulkan.cpp | |||
| @@ -13,11 +13,11 @@ | |||
| 13 | #include <fmt/format.h> | 13 | #include <fmt/format.h> |
| 14 | 14 | ||
| 15 | #include "common/logging/log.h" | 15 | #include "common/logging/log.h" |
| 16 | #include "common/settings.h" | ||
| 16 | #include "common/telemetry.h" | 17 | #include "common/telemetry.h" |
| 17 | #include "core/core.h" | 18 | #include "core/core.h" |
| 18 | #include "core/core_timing.h" | 19 | #include "core/core_timing.h" |
| 19 | #include "core/frontend/emu_window.h" | 20 | #include "core/frontend/emu_window.h" |
| 20 | #include "core/settings.h" | ||
| 21 | #include "core/telemetry_session.h" | 21 | #include "core/telemetry_session.h" |
| 22 | #include "video_core/gpu.h" | 22 | #include "video_core/gpu.h" |
| 23 | #include "video_core/renderer_vulkan/renderer_vulkan.h" | 23 | #include "video_core/renderer_vulkan/renderer_vulkan.h" |
diff --git a/src/video_core/renderer_vulkan/vk_master_semaphore.cpp b/src/video_core/renderer_vulkan/vk_master_semaphore.cpp index 56ec5e380..db78ce3d9 100644 --- a/src/video_core/renderer_vulkan/vk_master_semaphore.cpp +++ b/src/video_core/renderer_vulkan/vk_master_semaphore.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <atomic> | 5 | #include <atomic> |
| 6 | #include <chrono> | 6 | #include <chrono> |
| 7 | 7 | ||
| 8 | #include "core/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "video_core/renderer_vulkan/vk_master_semaphore.h" | 9 | #include "video_core/renderer_vulkan/vk_master_semaphore.h" |
| 10 | #include "video_core/vulkan_common/vulkan_device.h" | 10 | #include "video_core/vulkan_common/vulkan_device.h" |
| 11 | #include "video_core/vulkan_common/vulkan_wrapper.h" | 11 | #include "video_core/vulkan_common/vulkan_wrapper.h" |
diff --git a/src/video_core/renderer_vulkan/vk_master_semaphore.h b/src/video_core/renderer_vulkan/vk_master_semaphore.h index 2c7ed654d..4b6d64daa 100644 --- a/src/video_core/renderer_vulkan/vk_master_semaphore.h +++ b/src/video_core/renderer_vulkan/vk_master_semaphore.h | |||
| @@ -35,8 +35,8 @@ public: | |||
| 35 | } | 35 | } |
| 36 | 36 | ||
| 37 | /// Returns true when a tick has been hit by the GPU. | 37 | /// Returns true when a tick has been hit by the GPU. |
| 38 | [[nodiscard]] bool IsFree(u64 tick) { | 38 | [[nodiscard]] bool IsFree(u64 tick) const noexcept { |
| 39 | return gpu_tick.load(std::memory_order_relaxed) >= tick; | 39 | return KnownGpuTick() >= tick; |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | /// Advance to the logical tick. | 42 | /// Advance to the logical tick. |
diff --git a/src/video_core/renderer_vulkan/vk_rasterizer.cpp b/src/video_core/renderer_vulkan/vk_rasterizer.cpp index df5b7b172..e9a0e7811 100644 --- a/src/video_core/renderer_vulkan/vk_rasterizer.cpp +++ b/src/video_core/renderer_vulkan/vk_rasterizer.cpp | |||
| @@ -13,8 +13,8 @@ | |||
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/microprofile.h" | 14 | #include "common/microprofile.h" |
| 15 | #include "common/scope_exit.h" | 15 | #include "common/scope_exit.h" |
| 16 | #include "common/settings.h" | ||
| 16 | #include "core/core.h" | 17 | #include "core/core.h" |
| 17 | #include "core/settings.h" | ||
| 18 | #include "video_core/engines/kepler_compute.h" | 18 | #include "video_core/engines/kepler_compute.h" |
| 19 | #include "video_core/engines/maxwell_3d.h" | 19 | #include "video_core/engines/maxwell_3d.h" |
| 20 | #include "video_core/renderer_vulkan/blit_image.h" | 20 | #include "video_core/renderer_vulkan/blit_image.h" |
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 18155e449..bc2a53841 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp | |||
| @@ -7,6 +7,8 @@ | |||
| 7 | #include <span> | 7 | #include <span> |
| 8 | #include <vector> | 8 | #include <vector> |
| 9 | 9 | ||
| 10 | #include "common/bit_cast.h" | ||
| 11 | |||
| 10 | #include "video_core/engines/fermi_2d.h" | 12 | #include "video_core/engines/fermi_2d.h" |
| 11 | #include "video_core/renderer_vulkan/blit_image.h" | 13 | #include "video_core/renderer_vulkan/blit_image.h" |
| 12 | #include "video_core/renderer_vulkan/maxwell_to_vk.h" | 14 | #include "video_core/renderer_vulkan/maxwell_to_vk.h" |
| @@ -1062,14 +1064,13 @@ vk::ImageView ImageView::MakeDepthStencilView(VkImageAspectFlags aspect_mask) { | |||
| 1062 | Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& tsc) { | 1064 | Sampler::Sampler(TextureCacheRuntime& runtime, const Tegra::Texture::TSCEntry& tsc) { |
| 1063 | const auto& device = runtime.device; | 1065 | const auto& device = runtime.device; |
| 1064 | const bool arbitrary_borders = runtime.device.IsExtCustomBorderColorSupported(); | 1066 | const bool arbitrary_borders = runtime.device.IsExtCustomBorderColorSupported(); |
| 1065 | const std::array<float, 4> color = tsc.BorderColor(); | 1067 | const auto color = tsc.BorderColor(); |
| 1066 | // C++20 bit_cast | 1068 | |
| 1067 | VkClearColorValue border_color; | ||
| 1068 | std::memcpy(&border_color, &color, sizeof(color)); | ||
| 1069 | const VkSamplerCustomBorderColorCreateInfoEXT border_ci{ | 1069 | const VkSamplerCustomBorderColorCreateInfoEXT border_ci{ |
| 1070 | .sType = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT, | 1070 | .sType = VK_STRUCTURE_TYPE_SAMPLER_CUSTOM_BORDER_COLOR_CREATE_INFO_EXT, |
| 1071 | .pNext = nullptr, | 1071 | .pNext = nullptr, |
| 1072 | .customBorderColor = border_color, | 1072 | // TODO: Make use of std::bit_cast once libc++ supports it. |
| 1073 | .customBorderColor = Common::BitCast<VkClearColorValue>(color), | ||
| 1073 | .format = VK_FORMAT_UNDEFINED, | 1074 | .format = VK_FORMAT_UNDEFINED, |
| 1074 | }; | 1075 | }; |
| 1075 | const void* pnext = nullptr; | 1076 | const void* pnext = nullptr; |
diff --git a/src/video_core/texture_cache/image_view_base.cpp b/src/video_core/texture_cache/image_view_base.cpp index f89a40b4c..e8d632f9e 100644 --- a/src/video_core/texture_cache/image_view_base.cpp +++ b/src/video_core/texture_cache/image_view_base.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <algorithm> | 5 | #include <algorithm> |
| 6 | 6 | ||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "core/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "video_core/compatible_formats.h" | 9 | #include "video_core/compatible_formats.h" |
| 10 | #include "video_core/surface.h" | 10 | #include "video_core/surface.h" |
| 11 | #include "video_core/texture_cache/formatter.h" | 11 | #include "video_core/texture_cache/formatter.h" |
diff --git a/src/video_core/texture_cache/util.cpp b/src/video_core/texture_cache/util.cpp index c22dd0148..0ab297413 100644 --- a/src/video_core/texture_cache/util.cpp +++ b/src/video_core/texture_cache/util.cpp | |||
| @@ -268,16 +268,19 @@ template <u32 GOB_EXTENT> | |||
| 268 | return num_tiles << shift; | 268 | return num_tiles << shift; |
| 269 | } | 269 | } |
| 270 | 270 | ||
| 271 | [[nodiscard]] constexpr std::array<u32, MAX_MIP_LEVELS> CalculateLevelSizes(const LevelInfo& info, | 271 | [[nodiscard]] constexpr LevelArray CalculateLevelSizes(const LevelInfo& info, u32 num_levels) { |
| 272 | u32 num_levels) { | ||
| 273 | ASSERT(num_levels <= MAX_MIP_LEVELS); | 272 | ASSERT(num_levels <= MAX_MIP_LEVELS); |
| 274 | std::array<u32, MAX_MIP_LEVELS> sizes{}; | 273 | LevelArray sizes{}; |
| 275 | for (u32 level = 0; level < num_levels; ++level) { | 274 | for (u32 level = 0; level < num_levels; ++level) { |
| 276 | sizes[level] = CalculateLevelSize(info, level); | 275 | sizes[level] = CalculateLevelSize(info, level); |
| 277 | } | 276 | } |
| 278 | return sizes; | 277 | return sizes; |
| 279 | } | 278 | } |
| 280 | 279 | ||
| 280 | [[nodiscard]] u32 CalculateLevelBytes(const LevelArray& sizes, u32 num_levels) { | ||
| 281 | return std::reduce(sizes.begin(), sizes.begin() + num_levels, 0U); | ||
| 282 | } | ||
| 283 | |||
| 281 | [[nodiscard]] constexpr LevelInfo MakeLevelInfo(PixelFormat format, Extent3D size, Extent3D block, | 284 | [[nodiscard]] constexpr LevelInfo MakeLevelInfo(PixelFormat format, Extent3D size, Extent3D block, |
| 282 | u32 num_samples, u32 tile_width_spacing) { | 285 | u32 num_samples, u32 tile_width_spacing) { |
| 283 | const auto [samples_x, samples_y] = Samples(num_samples); | 286 | const auto [samples_x, samples_y] = Samples(num_samples); |
| @@ -566,10 +569,10 @@ void SwizzleBlockLinearImage(Tegra::MemoryManager& gpu_memory, GPUVAddr gpu_addr | |||
| 566 | 569 | ||
| 567 | const u32 num_levels = info.resources.levels; | 570 | const u32 num_levels = info.resources.levels; |
| 568 | const std::array sizes = CalculateLevelSizes(level_info, num_levels); | 571 | const std::array sizes = CalculateLevelSizes(level_info, num_levels); |
| 569 | size_t guest_offset = std::reduce(sizes.begin(), sizes.begin() + level, 0); | 572 | size_t guest_offset = CalculateLevelBytes(sizes, level); |
| 570 | const size_t layer_stride = | 573 | const size_t layer_stride = |
| 571 | AlignLayerSize(std::reduce(sizes.begin(), sizes.begin() + num_levels, 0), size, | 574 | AlignLayerSize(CalculateLevelBytes(sizes, num_levels), size, level_info.block, |
| 572 | level_info.block, tile_size.height, info.tile_width_spacing); | 575 | tile_size.height, info.tile_width_spacing); |
| 573 | const size_t subresource_size = sizes[level]; | 576 | const size_t subresource_size = sizes[level]; |
| 574 | 577 | ||
| 575 | const auto dst_data = std::make_unique<u8[]>(subresource_size); | 578 | const auto dst_data = std::make_unique<u8[]>(subresource_size); |
| @@ -643,10 +646,10 @@ u32 CalculateLayerSize(const ImageInfo& info) noexcept { | |||
| 643 | info.tile_width_spacing, info.resources.levels); | 646 | info.tile_width_spacing, info.resources.levels); |
| 644 | } | 647 | } |
| 645 | 648 | ||
| 646 | std::array<u32, MAX_MIP_LEVELS> CalculateMipLevelOffsets(const ImageInfo& info) noexcept { | 649 | LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept { |
| 647 | ASSERT(info.resources.levels <= static_cast<s32>(MAX_MIP_LEVELS)); | 650 | ASSERT(info.resources.levels <= static_cast<s32>(MAX_MIP_LEVELS)); |
| 648 | const LevelInfo level_info = MakeLevelInfo(info); | 651 | const LevelInfo level_info = MakeLevelInfo(info); |
| 649 | std::array<u32, MAX_MIP_LEVELS> offsets{}; | 652 | LevelArray offsets{}; |
| 650 | u32 offset = 0; | 653 | u32 offset = 0; |
| 651 | for (s32 level = 0; level < info.resources.levels; ++level) { | 654 | for (s32 level = 0; level < info.resources.levels; ++level) { |
| 652 | offsets[level] = offset; | 655 | offsets[level] = offset; |
| @@ -812,7 +815,7 @@ std::vector<BufferImageCopy> UnswizzleImage(Tegra::MemoryManager& gpu_memory, GP | |||
| 812 | const Extent2D tile_size = DefaultBlockSize(info.format); | 815 | const Extent2D tile_size = DefaultBlockSize(info.format); |
| 813 | const std::array level_sizes = CalculateLevelSizes(level_info, num_levels); | 816 | const std::array level_sizes = CalculateLevelSizes(level_info, num_levels); |
| 814 | const Extent2D gob = GobSize(bpp_log2, info.block.height, info.tile_width_spacing); | 817 | const Extent2D gob = GobSize(bpp_log2, info.block.height, info.tile_width_spacing); |
| 815 | const u32 layer_size = std::reduce(level_sizes.begin(), level_sizes.begin() + num_levels, 0); | 818 | const u32 layer_size = CalculateLevelBytes(level_sizes, num_levels); |
| 816 | const u32 layer_stride = AlignLayerSize(layer_size, size, level_info.block, tile_size.height, | 819 | const u32 layer_stride = AlignLayerSize(layer_size, size, level_info.block, tile_size.height, |
| 817 | info.tile_width_spacing); | 820 | info.tile_width_spacing); |
| 818 | size_t guest_offset = 0; | 821 | size_t guest_offset = 0; |
diff --git a/src/video_core/texture_cache/util.h b/src/video_core/texture_cache/util.h index 4d0072867..cdc5cbc75 100644 --- a/src/video_core/texture_cache/util.h +++ b/src/video_core/texture_cache/util.h | |||
| @@ -20,6 +20,8 @@ namespace VideoCommon { | |||
| 20 | 20 | ||
| 21 | using Tegra::Texture::TICEntry; | 21 | using Tegra::Texture::TICEntry; |
| 22 | 22 | ||
| 23 | using LevelArray = std::array<u32, MAX_MIP_LEVELS>; | ||
| 24 | |||
| 23 | struct OverlapResult { | 25 | struct OverlapResult { |
| 24 | GPUVAddr gpu_addr; | 26 | GPUVAddr gpu_addr; |
| 25 | VAddr cpu_addr; | 27 | VAddr cpu_addr; |
| @@ -36,8 +38,7 @@ struct OverlapResult { | |||
| 36 | 38 | ||
| 37 | [[nodiscard]] u32 CalculateLayerSize(const ImageInfo& info) noexcept; | 39 | [[nodiscard]] u32 CalculateLayerSize(const ImageInfo& info) noexcept; |
| 38 | 40 | ||
| 39 | [[nodiscard]] std::array<u32, MAX_MIP_LEVELS> CalculateMipLevelOffsets( | 41 | [[nodiscard]] LevelArray CalculateMipLevelOffsets(const ImageInfo& info) noexcept; |
| 40 | const ImageInfo& info) noexcept; | ||
| 41 | 42 | ||
| 42 | [[nodiscard]] std::vector<u32> CalculateSliceOffsets(const ImageInfo& info); | 43 | [[nodiscard]] std::vector<u32> CalculateSliceOffsets(const ImageInfo& info); |
| 43 | 44 | ||
diff --git a/src/video_core/textures/texture.cpp b/src/video_core/textures/texture.cpp index ae5621a7d..a552543ed 100644 --- a/src/video_core/textures/texture.cpp +++ b/src/video_core/textures/texture.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <array> | 6 | #include <array> |
| 7 | 7 | ||
| 8 | #include "common/cityhash.h" | 8 | #include "common/cityhash.h" |
| 9 | #include "core/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "video_core/textures/texture.h" | 10 | #include "video_core/textures/texture.h" |
| 11 | 11 | ||
| 12 | using Tegra::Texture::TICEntry; | 12 | using Tegra::Texture::TICEntry; |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index e1b38c6ac..3b575db4d 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | #include <memory> | 5 | #include <memory> |
| 6 | 6 | ||
| 7 | #include "common/logging/log.h" | 7 | #include "common/logging/log.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "core/core.h" | 9 | #include "core/core.h" |
| 9 | #include "core/settings.h" | ||
| 10 | #include "video_core/renderer_base.h" | 10 | #include "video_core/renderer_base.h" |
| 11 | #include "video_core/renderer_opengl/renderer_opengl.h" | 11 | #include "video_core/renderer_opengl/renderer_opengl.h" |
| 12 | #include "video_core/renderer_vulkan/renderer_vulkan.h" | 12 | #include "video_core/renderer_vulkan/renderer_vulkan.h" |
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 230b8717b..64206b3d2 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include <vector> | 12 | #include <vector> |
| 13 | 13 | ||
| 14 | #include "common/assert.h" | 14 | #include "common/assert.h" |
| 15 | #include "core/settings.h" | 15 | #include "common/settings.h" |
| 16 | #include "video_core/vulkan_common/nsight_aftermath_tracker.h" | 16 | #include "video_core/vulkan_common/nsight_aftermath_tracker.h" |
| 17 | #include "video_core/vulkan_common/vulkan_device.h" | 17 | #include "video_core/vulkan_common/vulkan_device.h" |
| 18 | #include "video_core/vulkan_common/vulkan_wrapper.h" | 18 | #include "video_core/vulkan_common/vulkan_wrapper.h" |
diff --git a/src/yuzu/applets/controller.cpp b/src/yuzu/applets/controller.cpp index b92cd6886..836d90fda 100644 --- a/src/yuzu/applets/controller.cpp +++ b/src/yuzu/applets/controller.cpp | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include "yuzu/applets/controller.h" | 16 | #include "yuzu/applets/controller.h" |
| 17 | #include "yuzu/configuration/configure_input.h" | 17 | #include "yuzu/configuration/configure_input.h" |
| 18 | #include "yuzu/configuration/configure_input_profile_dialog.h" | 18 | #include "yuzu/configuration/configure_input_profile_dialog.h" |
| 19 | #include "yuzu/configuration/configure_motion_touch.h" | ||
| 19 | #include "yuzu/configuration/configure_vibration.h" | 20 | #include "yuzu/configuration/configure_vibration.h" |
| 20 | #include "yuzu/configuration/input_profiles.h" | 21 | #include "yuzu/configuration/input_profiles.h" |
| 21 | #include "yuzu/main.h" | 22 | #include "yuzu/main.h" |
| @@ -206,6 +207,9 @@ QtControllerSelectorDialog::QtControllerSelectorDialog( | |||
| 206 | connect(ui->vibrationButton, &QPushButton::clicked, this, | 207 | connect(ui->vibrationButton, &QPushButton::clicked, this, |
| 207 | &QtControllerSelectorDialog::CallConfigureVibrationDialog); | 208 | &QtControllerSelectorDialog::CallConfigureVibrationDialog); |
| 208 | 209 | ||
| 210 | connect(ui->motionButton, &QPushButton::clicked, this, | ||
| 211 | &QtControllerSelectorDialog::CallConfigureMotionTouchDialog); | ||
| 212 | |||
| 209 | connect(ui->inputConfigButton, &QPushButton::clicked, this, | 213 | connect(ui->inputConfigButton, &QPushButton::clicked, this, |
| 210 | &QtControllerSelectorDialog::CallConfigureInputProfileDialog); | 214 | &QtControllerSelectorDialog::CallConfigureInputProfileDialog); |
| 211 | 215 | ||
| @@ -276,6 +280,18 @@ void QtControllerSelectorDialog::CallConfigureVibrationDialog() { | |||
| 276 | } | 280 | } |
| 277 | } | 281 | } |
| 278 | 282 | ||
| 283 | void QtControllerSelectorDialog::CallConfigureMotionTouchDialog() { | ||
| 284 | ConfigureMotionTouch dialog(this, input_subsystem); | ||
| 285 | |||
| 286 | dialog.setWindowFlags(Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowTitleHint | | ||
| 287 | Qt::WindowSystemMenuHint); | ||
| 288 | dialog.setWindowModality(Qt::WindowModal); | ||
| 289 | |||
| 290 | if (dialog.exec() == QDialog::Accepted) { | ||
| 291 | dialog.ApplyConfiguration(); | ||
| 292 | } | ||
| 293 | } | ||
| 294 | |||
| 279 | void QtControllerSelectorDialog::CallConfigureInputProfileDialog() { | 295 | void QtControllerSelectorDialog::CallConfigureInputProfileDialog() { |
| 280 | ConfigureInputProfileDialog dialog(this, input_subsystem, input_profiles.get()); | 296 | ConfigureInputProfileDialog dialog(this, input_subsystem, input_profiles.get()); |
| 281 | 297 | ||
diff --git a/src/yuzu/applets/controller.h b/src/yuzu/applets/controller.h index 3518eed56..9b57aea1a 100644 --- a/src/yuzu/applets/controller.h +++ b/src/yuzu/applets/controller.h | |||
| @@ -51,6 +51,9 @@ private: | |||
| 51 | // Initializes the "Configure Vibration" Dialog. | 51 | // Initializes the "Configure Vibration" Dialog. |
| 52 | void CallConfigureVibrationDialog(); | 52 | void CallConfigureVibrationDialog(); |
| 53 | 53 | ||
| 54 | // Initializes the "Configure Motion / Touch" Dialog. | ||
| 55 | void CallConfigureMotionTouchDialog(); | ||
| 56 | |||
| 54 | // Initializes the "Create Input Profile" Dialog. | 57 | // Initializes the "Create Input Profile" Dialog. |
| 55 | void CallConfigureInputProfileDialog(); | 58 | void CallConfigureInputProfileDialog(); |
| 56 | 59 | ||
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 15c09e0ad..9c7daeac7 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -29,10 +29,10 @@ | |||
| 29 | #include "common/microprofile.h" | 29 | #include "common/microprofile.h" |
| 30 | #include "common/scm_rev.h" | 30 | #include "common/scm_rev.h" |
| 31 | #include "common/scope_exit.h" | 31 | #include "common/scope_exit.h" |
| 32 | #include "common/settings.h" | ||
| 32 | #include "core/core.h" | 33 | #include "core/core.h" |
| 33 | #include "core/frontend/framebuffer_layout.h" | 34 | #include "core/frontend/framebuffer_layout.h" |
| 34 | #include "core/hle/kernel/process.h" | 35 | #include "core/hle/kernel/process.h" |
| 35 | #include "core/settings.h" | ||
| 36 | #include "input_common/keyboard.h" | 36 | #include "input_common/keyboard.h" |
| 37 | #include "input_common/main.h" | 37 | #include "input_common/main.h" |
| 38 | #include "input_common/mouse/mouse_input.h" | 38 | #include "input_common/mouse/mouse_input.h" |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 50ea15e2a..851246233 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -641,6 +641,8 @@ void Config::ReadDebuggingValues() { | |||
| 641 | ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); | 641 | ReadSetting(QStringLiteral("disable_macro_jit"), false).toBool(); |
| 642 | Settings::values.extended_logging = | 642 | Settings::values.extended_logging = |
| 643 | ReadSetting(QStringLiteral("extended_logging"), false).toBool(); | 643 | ReadSetting(QStringLiteral("extended_logging"), false).toBool(); |
| 644 | Settings::values.use_debug_asserts = | ||
| 645 | ReadSetting(QStringLiteral("use_debug_asserts"), false).toBool(); | ||
| 644 | Settings::values.use_auto_stub = ReadSetting(QStringLiteral("use_auto_stub"), false).toBool(); | 646 | Settings::values.use_auto_stub = ReadSetting(QStringLiteral("use_auto_stub"), false).toBool(); |
| 645 | 647 | ||
| 646 | qt_config->endGroup(); | 648 | qt_config->endGroup(); |
| @@ -1238,6 +1240,7 @@ void Config::SaveDebuggingValues() { | |||
| 1238 | WriteSetting(QStringLiteral("dump_exefs"), Settings::values.dump_exefs, false); | 1240 | WriteSetting(QStringLiteral("dump_exefs"), Settings::values.dump_exefs, false); |
| 1239 | WriteSetting(QStringLiteral("dump_nso"), Settings::values.dump_nso, false); | 1241 | WriteSetting(QStringLiteral("dump_nso"), Settings::values.dump_nso, false); |
| 1240 | WriteSetting(QStringLiteral("quest_flag"), Settings::values.quest_flag, false); | 1242 | WriteSetting(QStringLiteral("quest_flag"), Settings::values.quest_flag, false); |
| 1243 | WriteSetting(QStringLiteral("use_debug_asserts"), Settings::values.use_debug_asserts, false); | ||
| 1241 | WriteSetting(QStringLiteral("disable_macro_jit"), Settings::values.disable_macro_jit, false); | 1244 | WriteSetting(QStringLiteral("disable_macro_jit"), Settings::values.disable_macro_jit, false); |
| 1242 | 1245 | ||
| 1243 | qt_config->endGroup(); | 1246 | qt_config->endGroup(); |
| @@ -1599,7 +1602,7 @@ void Config::Reload() { | |||
| 1599 | ReadValues(); | 1602 | ReadValues(); |
| 1600 | // To apply default value changes | 1603 | // To apply default value changes |
| 1601 | SaveValues(); | 1604 | SaveValues(); |
| 1602 | Settings::Apply(Core::System::GetInstance()); | 1605 | Core::System::GetInstance().ApplySettings(); |
| 1603 | } | 1606 | } |
| 1604 | 1607 | ||
| 1605 | void Config::Save() { | 1608 | void Config::Save() { |
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index 949c4eb13..5a2c026b3 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | #include <string> | 9 | #include <string> |
| 10 | #include <QMetaType> | 10 | #include <QMetaType> |
| 11 | #include <QVariant> | 11 | #include <QVariant> |
| 12 | #include "core/settings.h" | 12 | #include "common/settings.h" |
| 13 | #include "yuzu/uisettings.h" | 13 | #include "yuzu/uisettings.h" |
| 14 | 14 | ||
| 15 | class QSettings; | 15 | class QSettings; |
| @@ -131,6 +131,6 @@ private: | |||
| 131 | bool global; | 131 | bool global; |
| 132 | }; | 132 | }; |
| 133 | 133 | ||
| 134 | // These metatype declarations cannot be in core/settings.h because core is devoid of QT | 134 | // These metatype declarations cannot be in common/settings.h because core is devoid of QT |
| 135 | Q_DECLARE_METATYPE(Settings::RendererBackend); | 135 | Q_DECLARE_METATYPE(Settings::RendererBackend); |
| 136 | Q_DECLARE_METATYPE(Settings::GPUAccuracy); | 136 | Q_DECLARE_METATYPE(Settings::GPUAccuracy); |
diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 18482795c..89be4a62d 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <QComboBox> | 6 | #include <QComboBox> |
| 7 | #include <QObject> | 7 | #include <QObject> |
| 8 | #include <QString> | 8 | #include <QString> |
| 9 | #include "core/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "yuzu/configuration/configuration_shared.h" | 10 | #include "yuzu/configuration/configuration_shared.h" |
| 11 | #include "yuzu/configuration/configure_per_game.h" | 11 | #include "yuzu/configuration/configure_per_game.h" |
| 12 | 12 | ||
diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h index 312b9e549..5b344cdbd 100644 --- a/src/yuzu/configuration/configuration_shared.h +++ b/src/yuzu/configuration/configuration_shared.h | |||
| @@ -7,7 +7,7 @@ | |||
| 7 | #include <QCheckBox> | 7 | #include <QCheckBox> |
| 8 | #include <QComboBox> | 8 | #include <QComboBox> |
| 9 | #include <QString> | 9 | #include <QString> |
| 10 | #include "core/settings.h" | 10 | #include "common/settings.h" |
| 11 | 11 | ||
| 12 | namespace ConfigurationShared { | 12 | namespace ConfigurationShared { |
| 13 | 13 | ||
diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index db9518798..f9507e228 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp | |||
| @@ -8,8 +8,8 @@ | |||
| 8 | 8 | ||
| 9 | #include "audio_core/sink.h" | 9 | #include "audio_core/sink.h" |
| 10 | #include "audio_core/sink_details.h" | 10 | #include "audio_core/sink_details.h" |
| 11 | #include "common/settings.h" | ||
| 11 | #include "core/core.h" | 12 | #include "core/core.h" |
| 12 | #include "core/settings.h" | ||
| 13 | #include "ui_configure_audio.h" | 13 | #include "ui_configure_audio.h" |
| 14 | #include "yuzu/configuration/configuration_shared.h" | 14 | #include "yuzu/configuration/configuration_shared.h" |
| 15 | #include "yuzu/configuration/configure_audio.h" | 15 | #include "yuzu/configuration/configure_audio.h" |
diff --git a/src/yuzu/configuration/configure_cpu.cpp b/src/yuzu/configuration/configure_cpu.cpp index d055cbd60..4f99bc80f 100644 --- a/src/yuzu/configuration/configure_cpu.cpp +++ b/src/yuzu/configuration/configure_cpu.cpp | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | 7 | ||
| 8 | #include "common/common_types.h" | 8 | #include "common/common_types.h" |
| 9 | #include "common/logging/log.h" | 9 | #include "common/logging/log.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "core/core.h" | 11 | #include "core/core.h" |
| 11 | #include "core/settings.h" | ||
| 12 | #include "ui_configure_cpu.h" | 12 | #include "ui_configure_cpu.h" |
| 13 | #include "yuzu/configuration/configure_cpu.h" | 13 | #include "yuzu/configuration/configure_cpu.h" |
| 14 | 14 | ||
diff --git a/src/yuzu/configuration/configure_cpu.h b/src/yuzu/configuration/configure_cpu.h index 3c5683d81..ef77b2e7e 100644 --- a/src/yuzu/configuration/configure_cpu.h +++ b/src/yuzu/configuration/configure_cpu.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <QWidget> | 8 | #include <QWidget> |
| 9 | #include "core/settings.h" | 9 | #include "common/settings.h" |
| 10 | 10 | ||
| 11 | namespace Ui { | 11 | namespace Ui { |
| 12 | class ConfigureCpu; | 12 | class ConfigureCpu; |
diff --git a/src/yuzu/configuration/configure_cpu_debug.cpp b/src/yuzu/configuration/configure_cpu_debug.cpp index 3385b2cf6..c925c023c 100644 --- a/src/yuzu/configuration/configure_cpu_debug.cpp +++ b/src/yuzu/configuration/configure_cpu_debug.cpp | |||
| @@ -6,8 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | #include "common/common_types.h" | 7 | #include "common/common_types.h" |
| 8 | #include "common/logging/log.h" | 8 | #include "common/logging/log.h" |
| 9 | #include "common/settings.h" | ||
| 9 | #include "core/core.h" | 10 | #include "core/core.h" |
| 10 | #include "core/settings.h" | ||
| 11 | #include "ui_configure_cpu_debug.h" | 11 | #include "ui_configure_cpu_debug.h" |
| 12 | #include "yuzu/configuration/configure_cpu_debug.h" | 12 | #include "yuzu/configuration/configure_cpu_debug.h" |
| 13 | 13 | ||
diff --git a/src/yuzu/configuration/configure_cpu_debug.h b/src/yuzu/configuration/configure_cpu_debug.h index c9941ef3b..10de55099 100644 --- a/src/yuzu/configuration/configure_cpu_debug.h +++ b/src/yuzu/configuration/configure_cpu_debug.h | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | 6 | ||
| 7 | #include <memory> | 7 | #include <memory> |
| 8 | #include <QWidget> | 8 | #include <QWidget> |
| 9 | #include "core/settings.h" | 9 | #include "common/settings.h" |
| 10 | 10 | ||
| 11 | namespace Ui { | 11 | namespace Ui { |
| 12 | class ConfigureCpuDebug; | 12 | class ConfigureCpuDebug; |
diff --git a/src/yuzu/configuration/configure_debug.cpp b/src/yuzu/configuration/configure_debug.cpp index 3a09f74ff..6730eb356 100644 --- a/src/yuzu/configuration/configure_debug.cpp +++ b/src/yuzu/configuration/configure_debug.cpp | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include "common/file_util.h" | 7 | #include "common/file_util.h" |
| 8 | #include "common/logging/backend.h" | 8 | #include "common/logging/backend.h" |
| 9 | #include "common/logging/filter.h" | 9 | #include "common/logging/filter.h" |
| 10 | #include "common/settings.h" | ||
| 10 | #include "core/core.h" | 11 | #include "core/core.h" |
| 11 | #include "core/settings.h" | ||
| 12 | #include "ui_configure_debug.h" | 12 | #include "ui_configure_debug.h" |
| 13 | #include "yuzu/configuration/configure_debug.h" | 13 | #include "yuzu/configuration/configure_debug.h" |
| 14 | #include "yuzu/debugger/console.h" | 14 | #include "yuzu/debugger/console.h" |
| @@ -34,6 +34,7 @@ void ConfigureDebug::SetConfiguration() { | |||
| 34 | ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); | 34 | ui->homebrew_args_edit->setText(QString::fromStdString(Settings::values.program_args)); |
| 35 | ui->reporting_services->setChecked(Settings::values.reporting_services); | 35 | ui->reporting_services->setChecked(Settings::values.reporting_services); |
| 36 | ui->quest_flag->setChecked(Settings::values.quest_flag); | 36 | ui->quest_flag->setChecked(Settings::values.quest_flag); |
| 37 | ui->use_debug_asserts->setChecked(Settings::values.use_debug_asserts); | ||
| 37 | ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); | 38 | ui->use_auto_stub->setChecked(Settings::values.use_auto_stub); |
| 38 | ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); | 39 | ui->enable_graphics_debugging->setEnabled(!Core::System::GetInstance().IsPoweredOn()); |
| 39 | ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); | 40 | ui->enable_graphics_debugging->setChecked(Settings::values.renderer_debug); |
| @@ -48,6 +49,7 @@ void ConfigureDebug::ApplyConfiguration() { | |||
| 48 | Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); | 49 | Settings::values.program_args = ui->homebrew_args_edit->text().toStdString(); |
| 49 | Settings::values.reporting_services = ui->reporting_services->isChecked(); | 50 | Settings::values.reporting_services = ui->reporting_services->isChecked(); |
| 50 | Settings::values.quest_flag = ui->quest_flag->isChecked(); | 51 | Settings::values.quest_flag = ui->quest_flag->isChecked(); |
| 52 | Settings::values.use_debug_asserts = ui->use_debug_asserts->isChecked(); | ||
| 51 | Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); | 53 | Settings::values.use_auto_stub = ui->use_auto_stub->isChecked(); |
| 52 | Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); | 54 | Settings::values.renderer_debug = ui->enable_graphics_debugging->isChecked(); |
| 53 | Settings::values.disable_macro_jit = ui->disable_macro_jit->isChecked(); | 55 | 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 @@ | |||
| 186 | </widget> | 186 | </widget> |
| 187 | </item> | 187 | </item> |
| 188 | <item> | 188 | <item> |
| 189 | <widget class="QCheckBox" name="use_debug_asserts"> | ||
| 190 | <property name="text"> | ||
| 191 | <string>Enable Debug Asserts</string> | ||
| 192 | </property> | ||
| 193 | </widget> | ||
| 194 | </item> | ||
| 195 | <item> | ||
| 189 | <widget class="QCheckBox" name="use_auto_stub"> | 196 | <widget class="QCheckBox" name="use_auto_stub"> |
| 190 | <property name="text"> | 197 | <property name="text"> |
| 191 | <string>Enable Auto-Stub</string> | 198 | <string>Enable Auto-Stub</string> |
diff --git a/src/yuzu/configuration/configure_dialog.cpp b/src/yuzu/configuration/configure_dialog.cpp index d6b17a28d..3ad40d2b3 100644 --- a/src/yuzu/configuration/configure_dialog.cpp +++ b/src/yuzu/configuration/configure_dialog.cpp | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | #include <QHash> | 5 | #include <QHash> |
| 6 | #include <QListWidgetItem> | 6 | #include <QListWidgetItem> |
| 7 | #include <QSignalBlocker> | 7 | #include <QSignalBlocker> |
| 8 | #include "common/settings.h" | ||
| 8 | #include "core/core.h" | 9 | #include "core/core.h" |
| 9 | #include "core/settings.h" | ||
| 10 | #include "ui_configure.h" | 10 | #include "ui_configure.h" |
| 11 | #include "yuzu/configuration/config.h" | 11 | #include "yuzu/configuration/config.h" |
| 12 | #include "yuzu/configuration/configure_dialog.h" | 12 | #include "yuzu/configuration/configure_dialog.h" |
| @@ -55,7 +55,7 @@ void ConfigureDialog::ApplyConfiguration() { | |||
| 55 | ui->debugTab->ApplyConfiguration(); | 55 | ui->debugTab->ApplyConfiguration(); |
| 56 | ui->webTab->ApplyConfiguration(); | 56 | ui->webTab->ApplyConfiguration(); |
| 57 | ui->serviceTab->ApplyConfiguration(); | 57 | ui->serviceTab->ApplyConfiguration(); |
| 58 | Settings::Apply(Core::System::GetInstance()); | 58 | Core::System::GetInstance().ApplySettings(); |
| 59 | Settings::LogSettings(); | 59 | Settings::LogSettings(); |
| 60 | } | 60 | } |
| 61 | 61 | ||
diff --git a/src/yuzu/configuration/configure_filesystem.cpp b/src/yuzu/configuration/configure_filesystem.cpp index 58f644af4..006eda4b0 100644 --- a/src/yuzu/configuration/configure_filesystem.cpp +++ b/src/yuzu/configuration/configure_filesystem.cpp | |||
| @@ -6,7 +6,7 @@ | |||
| 6 | #include <QMessageBox> | 6 | #include <QMessageBox> |
| 7 | #include "common/common_paths.h" | 7 | #include "common/common_paths.h" |
| 8 | #include "common/file_util.h" | 8 | #include "common/file_util.h" |
| 9 | #include "core/settings.h" | 9 | #include "common/settings.h" |
| 10 | #include "ui_configure_filesystem.h" | 10 | #include "ui_configure_filesystem.h" |
| 11 | #include "yuzu/configuration/configure_filesystem.h" | 11 | #include "yuzu/configuration/configure_filesystem.h" |
| 12 | #include "yuzu/uisettings.h" | 12 | #include "yuzu/uisettings.h" |
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index d4d29d422..2fa88dcec 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #include <QCheckBox> | 5 | #include <QCheckBox> |
| 6 | #include <QSpinBox> | 6 | #include <QSpinBox> |
| 7 | #include "common/settings.h" | ||
| 7 | #include "core/core.h" | 8 | #include "core/core.h" |
| 8 | #include "core/settings.h" | ||
| 9 | #include "ui_configure_general.h" | 9 | #include "ui_configure_general.h" |
| 10 | #include "yuzu/configuration/configuration_shared.h" | 10 | #include "yuzu/configuration/configuration_shared.h" |
| 11 | #include "yuzu/configuration/configure_general.h" | 11 | #include "yuzu/configuration/configure_general.h" |
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index 8a2008b2a..0a7536617 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp | |||
| @@ -11,8 +11,8 @@ | |||
| 11 | 11 | ||
| 12 | #include "common/common_types.h" | 12 | #include "common/common_types.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/settings.h" | ||
| 14 | #include "core/core.h" | 15 | #include "core/core.h" |
| 15 | #include "core/settings.h" | ||
| 16 | #include "ui_configure_graphics.h" | 16 | #include "ui_configure_graphics.h" |
| 17 | #include "video_core/vulkan_common/vulkan_instance.h" | 17 | #include "video_core/vulkan_common/vulkan_instance.h" |
| 18 | #include "video_core/vulkan_common/vulkan_library.h" | 18 | #include "video_core/vulkan_common/vulkan_library.h" |
diff --git a/src/yuzu/configuration/configure_graphics.h b/src/yuzu/configuration/configure_graphics.h index 1fefc88eb..c162048a2 100644 --- a/src/yuzu/configuration/configure_graphics.h +++ b/src/yuzu/configuration/configure_graphics.h | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <vector> | 8 | #include <vector> |
| 9 | #include <QString> | 9 | #include <QString> |
| 10 | #include <QWidget> | 10 | #include <QWidget> |
| 11 | #include "core/settings.h" | 11 | #include "common/settings.h" |
| 12 | 12 | ||
| 13 | namespace ConfigurationShared { | 13 | namespace ConfigurationShared { |
| 14 | enum class CheckState; | 14 | enum class CheckState; |
diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index 383c7bac8..c67609b0e 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp | |||
| @@ -2,8 +2,8 @@ | |||
| 2 | // Licensed under GPLv2 or any later version | 2 | // Licensed under GPLv2 or any later version |
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include "common/settings.h" | ||
| 5 | #include "core/core.h" | 6 | #include "core/core.h" |
| 6 | #include "core/settings.h" | ||
| 7 | #include "ui_configure_graphics_advanced.h" | 7 | #include "ui_configure_graphics_advanced.h" |
| 8 | #include "yuzu/configuration/configuration_shared.h" | 8 | #include "yuzu/configuration/configuration_shared.h" |
| 9 | #include "yuzu/configuration/configure_graphics_advanced.h" | 9 | #include "yuzu/configuration/configure_graphics_advanced.h" |
diff --git a/src/yuzu/configuration/configure_hotkeys.cpp b/src/yuzu/configuration/configure_hotkeys.cpp index cbee51a5e..ed76fe18e 100644 --- a/src/yuzu/configuration/configure_hotkeys.cpp +++ b/src/yuzu/configuration/configure_hotkeys.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <QMenu> | 5 | #include <QMenu> |
| 6 | #include <QMessageBox> | 6 | #include <QMessageBox> |
| 7 | #include <QStandardItemModel> | 7 | #include <QStandardItemModel> |
| 8 | #include "core/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "ui_configure_hotkeys.h" | 9 | #include "ui_configure_hotkeys.h" |
| 10 | #include "yuzu/configuration/config.h" | 10 | #include "yuzu/configuration/config.h" |
| 11 | #include "yuzu/configuration/configure_hotkeys.h" | 11 | #include "yuzu/configuration/configure_hotkeys.h" |
diff --git a/src/yuzu/configuration/configure_input_advanced.cpp b/src/yuzu/configuration/configure_input_advanced.cpp index a1a0eb676..d8d3b83dc 100644 --- a/src/yuzu/configuration/configure_input_advanced.cpp +++ b/src/yuzu/configuration/configure_input_advanced.cpp | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | // Refer to the license.txt file included. | 3 | // Refer to the license.txt file included. |
| 4 | 4 | ||
| 5 | #include <QColorDialog> | 5 | #include <QColorDialog> |
| 6 | #include "common/settings.h" | ||
| 6 | #include "core/core.h" | 7 | #include "core/core.h" |
| 7 | #include "core/settings.h" | ||
| 8 | #include "ui_configure_input_advanced.h" | 8 | #include "ui_configure_input_advanced.h" |
| 9 | #include "yuzu/configuration/configure_input_advanced.h" | 9 | #include "yuzu/configuration/configure_input_advanced.h" |
| 10 | 10 | ||
diff --git a/src/yuzu/configuration/configure_input_player.h b/src/yuzu/configuration/configure_input_player.h index efe953fbc..c7d101682 100644 --- a/src/yuzu/configuration/configure_input_player.h +++ b/src/yuzu/configuration/configure_input_player.h | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #include <QWidget> | 14 | #include <QWidget> |
| 15 | 15 | ||
| 16 | #include "common/param_package.h" | 16 | #include "common/param_package.h" |
| 17 | #include "core/settings.h" | 17 | #include "common/settings.h" |
| 18 | #include "ui_configure_input.h" | 18 | #include "ui_configure_input.h" |
| 19 | 19 | ||
| 20 | class QCheckBox; | 20 | class QCheckBox; |
diff --git a/src/yuzu/configuration/configure_input_player_widget.h b/src/yuzu/configuration/configure_input_player_widget.h index 91c3343f1..51bb84eb6 100644 --- a/src/yuzu/configuration/configure_input_player_widget.h +++ b/src/yuzu/configuration/configure_input_player_widget.h | |||
| @@ -7,8 +7,8 @@ | |||
| 7 | #include <array> | 7 | #include <array> |
| 8 | #include <QFrame> | 8 | #include <QFrame> |
| 9 | #include <QPointer> | 9 | #include <QPointer> |
| 10 | #include "common/settings.h" | ||
| 10 | #include "core/frontend/input.h" | 11 | #include "core/frontend/input.h" |
| 11 | #include "core/settings.h" | ||
| 12 | 12 | ||
| 13 | class QLabel; | 13 | class QLabel; |
| 14 | 14 | ||
diff --git a/src/yuzu/configuration/configure_motion_touch.cpp b/src/yuzu/configuration/configure_motion_touch.cpp index 083d1ea43..6a5d625df 100644 --- a/src/yuzu/configuration/configure_motion_touch.cpp +++ b/src/yuzu/configuration/configure_motion_touch.cpp | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | #include <QVBoxLayout> | 14 | #include <QVBoxLayout> |
| 15 | 15 | ||
| 16 | #include "common/logging/log.h" | 16 | #include "common/logging/log.h" |
| 17 | #include "core/settings.h" | 17 | #include "common/settings.h" |
| 18 | #include "input_common/main.h" | 18 | #include "input_common/main.h" |
| 19 | #include "input_common/udp/client.h" | 19 | #include "input_common/udp/client.h" |
| 20 | #include "input_common/udp/udp.h" | 20 | #include "input_common/udp/udp.h" |
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp index f598513df..bd91ebc42 100644 --- a/src/yuzu/configuration/configure_per_game.cpp +++ b/src/yuzu/configuration/configure_per_game.cpp | |||
| @@ -57,7 +57,7 @@ void ConfigurePerGame::ApplyConfiguration() { | |||
| 57 | ui->graphicsAdvancedTab->ApplyConfiguration(); | 57 | ui->graphicsAdvancedTab->ApplyConfiguration(); |
| 58 | ui->audioTab->ApplyConfiguration(); | 58 | ui->audioTab->ApplyConfiguration(); |
| 59 | 59 | ||
| 60 | Settings::Apply(Core::System::GetInstance()); | 60 | Core::System::GetInstance().ApplySettings(); |
| 61 | Settings::LogSettings(); | 61 | Settings::LogSettings(); |
| 62 | 62 | ||
| 63 | game_config->Save(); | 63 | game_config->Save(); |
diff --git a/src/yuzu/configuration/configure_profile_manager.cpp b/src/yuzu/configuration/configure_profile_manager.cpp index 51647a028..d61b5e29b 100644 --- a/src/yuzu/configuration/configure_profile_manager.cpp +++ b/src/yuzu/configuration/configure_profile_manager.cpp | |||
| @@ -13,10 +13,10 @@ | |||
| 13 | #include <QVBoxLayout> | 13 | #include <QVBoxLayout> |
| 14 | #include "common/assert.h" | 14 | #include "common/assert.h" |
| 15 | #include "common/file_util.h" | 15 | #include "common/file_util.h" |
| 16 | #include "common/settings.h" | ||
| 16 | #include "common/string_util.h" | 17 | #include "common/string_util.h" |
| 17 | #include "core/core.h" | 18 | #include "core/core.h" |
| 18 | #include "core/hle/service/acc/profile_manager.h" | 19 | #include "core/hle/service/acc/profile_manager.h" |
| 19 | #include "core/settings.h" | ||
| 20 | #include "ui_configure_profile_manager.h" | 20 | #include "ui_configure_profile_manager.h" |
| 21 | #include "yuzu/configuration/configure_profile_manager.h" | 21 | #include "yuzu/configuration/configure_profile_manager.h" |
| 22 | #include "yuzu/util/limitable_input_dialog.h" | 22 | #include "yuzu/util/limitable_input_dialog.h" |
| @@ -180,7 +180,7 @@ void ConfigureProfileManager::ApplyConfiguration() { | |||
| 180 | return; | 180 | return; |
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | Settings::Apply(Core::System::GetInstance()); | 183 | Core::System::GetInstance().ApplySettings(); |
| 184 | } | 184 | } |
| 185 | 185 | ||
| 186 | void ConfigureProfileManager::SelectUser(const QModelIndex& index) { | 186 | void ConfigureProfileManager::SelectUser(const QModelIndex& index) { |
diff --git a/src/yuzu/configuration/configure_service.cpp b/src/yuzu/configuration/configure_service.cpp index b580cfff2..6d954a67f 100644 --- a/src/yuzu/configuration/configure_service.cpp +++ b/src/yuzu/configuration/configure_service.cpp | |||
| @@ -4,8 +4,8 @@ | |||
| 4 | 4 | ||
| 5 | #include <QGraphicsItem> | 5 | #include <QGraphicsItem> |
| 6 | #include <QtConcurrent/QtConcurrent> | 6 | #include <QtConcurrent/QtConcurrent> |
| 7 | #include "common/settings.h" | ||
| 7 | #include "core/hle/service/bcat/backend/boxcat.h" | 8 | #include "core/hle/service/bcat/backend/boxcat.h" |
| 8 | #include "core/settings.h" | ||
| 9 | #include "ui_configure_service.h" | 9 | #include "ui_configure_service.h" |
| 10 | #include "yuzu/configuration/configure_service.h" | 10 | #include "yuzu/configuration/configure_service.h" |
| 11 | 11 | ||
diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 6cf2032da..268ed44c3 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp | |||
| @@ -11,9 +11,9 @@ | |||
| 11 | #include <QMessageBox> | 11 | #include <QMessageBox> |
| 12 | #include "common/assert.h" | 12 | #include "common/assert.h" |
| 13 | #include "common/file_util.h" | 13 | #include "common/file_util.h" |
| 14 | #include "common/settings.h" | ||
| 14 | #include "core/core.h" | 15 | #include "core/core.h" |
| 15 | #include "core/hle/service/time/time.h" | 16 | #include "core/hle/service/time/time.h" |
| 16 | #include "core/settings.h" | ||
| 17 | #include "ui_configure_system.h" | 17 | #include "ui_configure_system.h" |
| 18 | #include "yuzu/configuration/configuration_shared.h" | 18 | #include "yuzu/configuration/configuration_shared.h" |
| 19 | #include "yuzu/configuration/configure_system.h" | 19 | #include "yuzu/configuration/configure_system.h" |
| @@ -199,7 +199,7 @@ void ConfigureSystem::ApplyConfiguration() { | |||
| 199 | } | 199 | } |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | Settings::Apply(system); | 202 | system.ApplySettings(); |
| 203 | } | 203 | } |
| 204 | 204 | ||
| 205 | void ConfigureSystem::RefreshConsoleID() { | 205 | void ConfigureSystem::RefreshConsoleID() { |
diff --git a/src/yuzu/configuration/configure_touch_from_button.cpp b/src/yuzu/configuration/configure_touch_from_button.cpp index 15557e4b8..40129f228 100644 --- a/src/yuzu/configuration/configure_touch_from_button.cpp +++ b/src/yuzu/configuration/configure_touch_from_button.cpp | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | #include <QStandardItemModel> | 10 | #include <QStandardItemModel> |
| 11 | #include <QTimer> | 11 | #include <QTimer> |
| 12 | #include "common/param_package.h" | 12 | #include "common/param_package.h" |
| 13 | #include "common/settings.h" | ||
| 13 | #include "core/frontend/framebuffer_layout.h" | 14 | #include "core/frontend/framebuffer_layout.h" |
| 14 | #include "core/settings.h" | ||
| 15 | #include "input_common/main.h" | 15 | #include "input_common/main.h" |
| 16 | #include "ui_configure_touch_from_button.h" | 16 | #include "ui_configure_touch_from_button.h" |
| 17 | #include "yuzu/configuration/configure_touch_from_button.h" | 17 | #include "yuzu/configuration/configure_touch_from_button.h" |
diff --git a/src/yuzu/configuration/configure_ui.cpp b/src/yuzu/configuration/configure_ui.cpp index aed876008..f35c89e04 100644 --- a/src/yuzu/configuration/configure_ui.cpp +++ b/src/yuzu/configuration/configure_ui.cpp | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | #include <QDirIterator> | 9 | #include <QDirIterator> |
| 10 | #include "common/common_types.h" | 10 | #include "common/common_types.h" |
| 11 | #include "common/file_util.h" | 11 | #include "common/file_util.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "core/core.h" | 13 | #include "core/core.h" |
| 13 | #include "core/settings.h" | ||
| 14 | #include "ui_configure_ui.h" | 14 | #include "ui_configure_ui.h" |
| 15 | #include "yuzu/configuration/configure_ui.h" | 15 | #include "yuzu/configuration/configure_ui.h" |
| 16 | #include "yuzu/uisettings.h" | 16 | #include "yuzu/uisettings.h" |
| @@ -85,7 +85,7 @@ void ConfigureUi::ApplyConfiguration() { | |||
| 85 | UISettings::values.enable_screenshot_save_as = ui->enable_screenshot_save_as->isChecked(); | 85 | UISettings::values.enable_screenshot_save_as = ui->enable_screenshot_save_as->isChecked(); |
| 86 | Common::FS::GetUserPath(Common::FS::UserPath::ScreenshotsDir, | 86 | Common::FS::GetUserPath(Common::FS::UserPath::ScreenshotsDir, |
| 87 | ui->screenshot_path_edit->text().toStdString()); | 87 | ui->screenshot_path_edit->text().toStdString()); |
| 88 | Settings::Apply(Core::System::GetInstance()); | 88 | Core::System::GetInstance().ApplySettings(); |
| 89 | } | 89 | } |
| 90 | 90 | ||
| 91 | void ConfigureUi::RequestGameListUpdate() { | 91 | void ConfigureUi::RequestGameListUpdate() { |
diff --git a/src/yuzu/configuration/configure_vibration.cpp b/src/yuzu/configuration/configure_vibration.cpp index 7dcb2c5b9..9d92c4949 100644 --- a/src/yuzu/configuration/configure_vibration.cpp +++ b/src/yuzu/configuration/configure_vibration.cpp | |||
| @@ -8,7 +8,7 @@ | |||
| 8 | #include <fmt/format.h> | 8 | #include <fmt/format.h> |
| 9 | 9 | ||
| 10 | #include "common/param_package.h" | 10 | #include "common/param_package.h" |
| 11 | #include "core/settings.h" | 11 | #include "common/settings.h" |
| 12 | #include "ui_configure_vibration.h" | 12 | #include "ui_configure_vibration.h" |
| 13 | #include "yuzu/configuration/configure_vibration.h" | 13 | #include "yuzu/configuration/configure_vibration.h" |
| 14 | 14 | ||
diff --git a/src/yuzu/configuration/configure_web.cpp b/src/yuzu/configuration/configure_web.cpp index 8637f5b3c..f3f3b54d6 100644 --- a/src/yuzu/configuration/configure_web.cpp +++ b/src/yuzu/configuration/configure_web.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <QIcon> | 5 | #include <QIcon> |
| 6 | #include <QMessageBox> | 6 | #include <QMessageBox> |
| 7 | #include <QtConcurrent/QtConcurrentRun> | 7 | #include <QtConcurrent/QtConcurrentRun> |
| 8 | #include "core/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "core/telemetry_session.h" | 9 | #include "core/telemetry_session.h" |
| 10 | #include "ui_configure_web.h" | 10 | #include "ui_configure_web.h" |
| 11 | #include "yuzu/configuration/configure_web.h" | 11 | #include "yuzu/configuration/configure_web.h" |
diff --git a/src/yuzu/debugger/controller.cpp b/src/yuzu/debugger/controller.cpp index 2731d948d..7186eac76 100644 --- a/src/yuzu/debugger/controller.cpp +++ b/src/yuzu/debugger/controller.cpp | |||
| @@ -5,7 +5,7 @@ | |||
| 5 | #include <QAction> | 5 | #include <QAction> |
| 6 | #include <QLayout> | 6 | #include <QLayout> |
| 7 | #include <QString> | 7 | #include <QString> |
| 8 | #include "core/settings.h" | 8 | #include "common/settings.h" |
| 9 | #include "yuzu/configuration/configure_input_player_widget.h" | 9 | #include "yuzu/configuration/configure_input_player_widget.h" |
| 10 | #include "yuzu/debugger/controller.h" | 10 | #include "yuzu/debugger/controller.h" |
| 11 | 11 | ||
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 1dfa111e2..fbf96be03 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -79,6 +79,7 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual | |||
| 79 | #ifdef ARCHITECTURE_x86_64 | 79 | #ifdef ARCHITECTURE_x86_64 |
| 80 | #include "common/x64/cpu_detect.h" | 80 | #include "common/x64/cpu_detect.h" |
| 81 | #endif | 81 | #endif |
| 82 | #include "common/settings.h" | ||
| 82 | #include "common/telemetry.h" | 83 | #include "common/telemetry.h" |
| 83 | #include "core/core.h" | 84 | #include "core/core.h" |
| 84 | #include "core/crypto/key_manager.h" | 85 | #include "core/crypto/key_manager.h" |
| @@ -98,7 +99,6 @@ static FileSys::VirtualFile VfsDirectoryCreateFileWrapper(const FileSys::Virtual | |||
| 98 | #include "core/hle/service/sm/sm.h" | 99 | #include "core/hle/service/sm/sm.h" |
| 99 | #include "core/loader/loader.h" | 100 | #include "core/loader/loader.h" |
| 100 | #include "core/perf_stats.h" | 101 | #include "core/perf_stats.h" |
| 101 | #include "core/settings.h" | ||
| 102 | #include "core/telemetry_session.h" | 102 | #include "core/telemetry_session.h" |
| 103 | #include "input_common/main.h" | 103 | #include "input_common/main.h" |
| 104 | #include "video_core/gpu.h" | 104 | #include "video_core/gpu.h" |
| @@ -164,7 +164,7 @@ void GMainWindow::ShowTelemetryCallout() { | |||
| 164 | "<br/><br/>Would you like to share your usage data with us?"); | 164 | "<br/><br/>Would you like to share your usage data with us?"); |
| 165 | if (QMessageBox::question(this, tr("Telemetry"), telemetry_message) != QMessageBox::Yes) { | 165 | if (QMessageBox::question(this, tr("Telemetry"), telemetry_message) != QMessageBox::Yes) { |
| 166 | Settings::values.enable_telemetry = false; | 166 | Settings::values.enable_telemetry = false; |
| 167 | Settings::Apply(Core::System::GetInstance()); | 167 | Core::System::GetInstance().ApplySettings(); |
| 168 | } | 168 | } |
| 169 | } | 169 | } |
| 170 | 170 | ||
| @@ -387,7 +387,7 @@ void GMainWindow::ControllerSelectorReconfigureControllers( | |||
| 387 | emit ControllerSelectorReconfigureFinished(); | 387 | emit ControllerSelectorReconfigureFinished(); |
| 388 | 388 | ||
| 389 | // Don't forget to apply settings. | 389 | // Don't forget to apply settings. |
| 390 | Settings::Apply(Core::System::GetInstance()); | 390 | Core::System::GetInstance().ApplySettings(); |
| 391 | config->Save(); | 391 | config->Save(); |
| 392 | 392 | ||
| 393 | UpdateStatusButtons(); | 393 | UpdateStatusButtons(); |
| @@ -652,7 +652,7 @@ void GMainWindow::InitializeWidgets() { | |||
| 652 | Settings::values.use_asynchronous_gpu_emulation.SetValue( | 652 | Settings::values.use_asynchronous_gpu_emulation.SetValue( |
| 653 | !Settings::values.use_asynchronous_gpu_emulation.GetValue()); | 653 | !Settings::values.use_asynchronous_gpu_emulation.GetValue()); |
| 654 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); | 654 | async_status_button->setChecked(Settings::values.use_asynchronous_gpu_emulation.GetValue()); |
| 655 | Settings::Apply(Core::System::GetInstance()); | 655 | Core::System::GetInstance().ApplySettings(); |
| 656 | }); | 656 | }); |
| 657 | async_status_button->setText(tr("ASYNC")); | 657 | async_status_button->setText(tr("ASYNC")); |
| 658 | async_status_button->setCheckable(true); | 658 | async_status_button->setCheckable(true); |
| @@ -668,7 +668,7 @@ void GMainWindow::InitializeWidgets() { | |||
| 668 | } | 668 | } |
| 669 | Settings::values.use_multi_core.SetValue(!Settings::values.use_multi_core.GetValue()); | 669 | Settings::values.use_multi_core.SetValue(!Settings::values.use_multi_core.GetValue()); |
| 670 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); | 670 | multicore_status_button->setChecked(Settings::values.use_multi_core.GetValue()); |
| 671 | Settings::Apply(Core::System::GetInstance()); | 671 | Core::System::GetInstance().ApplySettings(); |
| 672 | }); | 672 | }); |
| 673 | multicore_status_button->setText(tr("MULTICORE")); | 673 | multicore_status_button->setText(tr("MULTICORE")); |
| 674 | multicore_status_button->setCheckable(true); | 674 | multicore_status_button->setCheckable(true); |
| @@ -699,7 +699,7 @@ void GMainWindow::InitializeWidgets() { | |||
| 699 | Settings::values.renderer_backend.SetValue(Settings::RendererBackend::OpenGL); | 699 | Settings::values.renderer_backend.SetValue(Settings::RendererBackend::OpenGL); |
| 700 | } | 700 | } |
| 701 | 701 | ||
| 702 | Settings::Apply(Core::System::GetInstance()); | 702 | Core::System::GetInstance().ApplySettings(); |
| 703 | }); | 703 | }); |
| 704 | statusBar()->insertPermanentWidget(0, renderer_status_button); | 704 | statusBar()->insertPermanentWidget(0, renderer_status_button); |
| 705 | 705 | ||
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 43877fc98..2f984d1b8 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -9,8 +9,8 @@ | |||
| 9 | #include "common/file_util.h" | 9 | #include "common/file_util.h" |
| 10 | #include "common/logging/log.h" | 10 | #include "common/logging/log.h" |
| 11 | #include "common/param_package.h" | 11 | #include "common/param_package.h" |
| 12 | #include "common/settings.h" | ||
| 12 | #include "core/hle/service/acc/profile_manager.h" | 13 | #include "core/hle/service/acc/profile_manager.h" |
| 13 | #include "core/settings.h" | ||
| 14 | #include "input_common/main.h" | 14 | #include "input_common/main.h" |
| 15 | #include "input_common/udp/client.h" | 15 | #include "input_common/udp/client.h" |
| 16 | #include "yuzu_cmd/config.h" | 16 | #include "yuzu_cmd/config.h" |
| @@ -428,6 +428,10 @@ void Config::ReadValues() { | |||
| 428 | Settings::values.reporting_services = | 428 | Settings::values.reporting_services = |
| 429 | sdl2_config->GetBoolean("Debugging", "reporting_services", false); | 429 | sdl2_config->GetBoolean("Debugging", "reporting_services", false); |
| 430 | Settings::values.quest_flag = sdl2_config->GetBoolean("Debugging", "quest_flag", false); | 430 | Settings::values.quest_flag = sdl2_config->GetBoolean("Debugging", "quest_flag", false); |
| 431 | Settings::values.use_debug_asserts = | ||
| 432 | sdl2_config->GetBoolean("Debugging", "use_debug_asserts", false); | ||
| 433 | Settings::values.use_auto_stub = sdl2_config->GetBoolean("Debugging", "use_auto_stub", false); | ||
| 434 | |||
| 431 | Settings::values.disable_macro_jit = | 435 | Settings::values.disable_macro_jit = |
| 432 | sdl2_config->GetBoolean("Debugging", "disable_macro_jit", false); | 436 | sdl2_config->GetBoolean("Debugging", "disable_macro_jit", false); |
| 433 | 437 | ||
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 | |||
| 325 | # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode | 325 | # Determines whether or not yuzu will report to the game that the emulated console is in Kiosk Mode |
| 326 | # false: Retail/Normal Mode (default), true: Kiosk Mode | 326 | # false: Retail/Normal Mode (default), true: Kiosk Mode |
| 327 | quest_flag = | 327 | quest_flag = |
| 328 | # Determines whether debug asserts should be enabled, which will throw an exception on asserts. | ||
| 329 | # false: Disabled (default), true: Enabled | ||
| 330 | use_debug_asserts = | ||
| 331 | # Determines whether unimplemented HLE service calls should be automatically stubbed. | ||
| 332 | # false: Disabled (default), true: Enabled | ||
| 333 | use_auto_stub = | ||
| 328 | # Enables/Disables the macro JIT compiler | 334 | # Enables/Disables the macro JIT compiler |
| 329 | disable_macro_jit=false | 335 | disable_macro_jit=false |
| 330 | 336 | ||
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index a02485c14..a765fa7b3 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | |||
| @@ -12,9 +12,9 @@ | |||
| 12 | #include "common/assert.h" | 12 | #include "common/assert.h" |
| 13 | #include "common/logging/log.h" | 13 | #include "common/logging/log.h" |
| 14 | #include "common/scm_rev.h" | 14 | #include "common/scm_rev.h" |
| 15 | #include "common/settings.h" | ||
| 15 | #include "common/string_util.h" | 16 | #include "common/string_util.h" |
| 16 | #include "core/core.h" | 17 | #include "core/core.h" |
| 17 | #include "core/settings.h" | ||
| 18 | #include "input_common/keyboard.h" | 18 | #include "input_common/keyboard.h" |
| 19 | #include "input_common/main.h" | 19 | #include "input_common/main.h" |
| 20 | #include "video_core/renderer_base.h" | 20 | #include "video_core/renderer_base.h" |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp index 6f9b00461..dfd53e285 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_vk.cpp | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | #include "common/assert.h" | 11 | #include "common/assert.h" |
| 12 | #include "common/logging/log.h" | 12 | #include "common/logging/log.h" |
| 13 | #include "common/scm_rev.h" | 13 | #include "common/scm_rev.h" |
| 14 | #include "core/settings.h" | 14 | #include "common/settings.h" |
| 15 | #include "video_core/renderer_vulkan/renderer_vulkan.h" | 15 | #include "video_core/renderer_vulkan/renderer_vulkan.h" |
| 16 | #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" | 16 | #include "yuzu_cmd/emu_window/emu_window_sdl2_vk.h" |
| 17 | 17 | ||
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp index 73a025364..4871ac3bb 100644 --- a/src/yuzu_cmd/yuzu.cpp +++ b/src/yuzu_cmd/yuzu.cpp | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include "common/nvidia_flags.h" | 20 | #include "common/nvidia_flags.h" |
| 21 | #include "common/scm_rev.h" | 21 | #include "common/scm_rev.h" |
| 22 | #include "common/scope_exit.h" | 22 | #include "common/scope_exit.h" |
| 23 | #include "common/settings.h" | ||
| 23 | #include "common/string_util.h" | 24 | #include "common/string_util.h" |
| 24 | #include "common/telemetry.h" | 25 | #include "common/telemetry.h" |
| 25 | #include "core/core.h" | 26 | #include "core/core.h" |
| @@ -29,7 +30,6 @@ | |||
| 29 | #include "core/hle/kernel/process.h" | 30 | #include "core/hle/kernel/process.h" |
| 30 | #include "core/hle/service/filesystem/filesystem.h" | 31 | #include "core/hle/service/filesystem/filesystem.h" |
| 31 | #include "core/loader/loader.h" | 32 | #include "core/loader/loader.h" |
| 32 | #include "core/settings.h" | ||
| 33 | #include "core/telemetry_session.h" | 33 | #include "core/telemetry_session.h" |
| 34 | #include "input_common/main.h" | 34 | #include "input_common/main.h" |
| 35 | #include "video_core/renderer_base.h" | 35 | #include "video_core/renderer_base.h" |
| @@ -166,7 +166,7 @@ int main(int argc, char** argv) { | |||
| 166 | InputCommon::InputSubsystem input_subsystem; | 166 | InputCommon::InputSubsystem input_subsystem; |
| 167 | 167 | ||
| 168 | // Apply the command line arguments | 168 | // Apply the command line arguments |
| 169 | Settings::Apply(system); | 169 | system.ApplySettings(); |
| 170 | 170 | ||
| 171 | std::unique_ptr<EmuWindow_SDL2> emu_window; | 171 | std::unique_ptr<EmuWindow_SDL2> emu_window; |
| 172 | switch (Settings::values.renderer_backend.GetValue()) { | 172 | switch (Settings::values.renderer_backend.GetValue()) { |