From 217fa040809c083a8b680962589da264f8d8e4c4 Mon Sep 17 00:00:00 2001 From: lat9nq <22451773+lat9nq@users.noreply.github.com> Date: Thu, 18 May 2023 23:05:21 -0400 Subject: [PATCH] configuration: Clean up includes a bit --- .../configuration/configuration_shared.cpp | 23 +------------------ src/yuzu/configuration/configuration_shared.h | 20 +++------------- src/yuzu/configuration/configure_audio.cpp | 1 + src/yuzu/configuration/configure_audio.h | 2 +- src/yuzu/configuration/configure_cpu.cpp | 1 + src/yuzu/configuration/configure_cpu.h | 10 +++----- src/yuzu/configuration/configure_dialog.h | 3 ++- src/yuzu/configuration/configure_graphics.h | 2 ++ .../configure_graphics_advanced.cpp | 1 + .../configure_graphics_advanced.h | 1 + src/yuzu/configuration/configure_per_game.h | 1 + src/yuzu/configuration/configure_system.cpp | 2 ++ src/yuzu/configuration/configure_system.h | 7 +++--- src/yuzu/configuration/shared_widget.cpp | 3 +++ 14 files changed, 26 insertions(+), 51 deletions(-) diff --git a/src/yuzu/configuration/configuration_shared.cpp b/src/yuzu/configuration/configuration_shared.cpp index 624d9ba1b..d3cfacf48 100644 --- a/src/yuzu/configuration/configuration_shared.cpp +++ b/src/yuzu/configuration/configuration_shared.cpp @@ -2,29 +2,8 @@ // SPDX-License-Identifier: GPL-2.0-or-later #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "common/settings.h" +#include #include "yuzu/configuration/configuration_shared.h" -#include "yuzu/configuration/configure_per_game.h" -#include "yuzu/configuration/shared_translation.h" namespace ConfigurationShared { diff --git a/src/yuzu/configuration/configuration_shared.h b/src/yuzu/configuration/configuration_shared.h index 046d78e2b..5313bfb4f 100644 --- a/src/yuzu/configuration/configuration_shared.h +++ b/src/yuzu/configuration/configuration_shared.h @@ -4,14 +4,12 @@ #pragma once #include -#include #include -#include -#include +#include #include #include -#include "common/settings.h" -#include "yuzu/configuration/shared_translation.h" + +class QObject; namespace ConfigurationShared { @@ -29,16 +27,4 @@ private: std::shared_ptr> group; }; -constexpr int USE_GLOBAL_INDEX = 0; -constexpr int USE_GLOBAL_SEPARATOR_INDEX = 1; -constexpr int USE_GLOBAL_OFFSET = 2; - -// CheckBoxes require a tracker for their state since we emulate a tristate CheckBox -enum class CheckState { - Off, // Checkbox overrides to off/false - On, // Checkbox overrides to on/true - Global, // Checkbox defers to the global state - Count, // Simply the number of states, not a valid checkbox state -}; - } // namespace ConfigurationShared diff --git a/src/yuzu/configuration/configure_audio.cpp b/src/yuzu/configuration/configure_audio.cpp index 1cafeaa31..0496bd78f 100644 --- a/src/yuzu/configuration/configure_audio.cpp +++ b/src/yuzu/configuration/configure_audio.cpp @@ -3,6 +3,7 @@ #include #include +#include #include "audio_core/sink/sink.h" #include "audio_core/sink/sink_details.h" diff --git a/src/yuzu/configuration/configure_audio.h b/src/yuzu/configuration/configure_audio.h index a9b005433..31cf682e0 100644 --- a/src/yuzu/configuration/configure_audio.h +++ b/src/yuzu/configuration/configure_audio.h @@ -10,7 +10,7 @@ #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/shared_translation.h" -class QPushButton; +class QComboBox; namespace Core { class System; diff --git a/src/yuzu/configuration/configure_cpu.cpp b/src/yuzu/configuration/configure_cpu.cpp index 0982e006d..ac298a50f 100644 --- a/src/yuzu/configuration/configure_cpu.cpp +++ b/src/yuzu/configuration/configure_cpu.cpp @@ -3,6 +3,7 @@ #include #include +#include #include "common/common_types.h" #include "common/settings.h" #include "configuration/shared_widget.h" diff --git a/src/yuzu/configuration/configure_cpu.h b/src/yuzu/configuration/configure_cpu.h index fb970122d..57603e5c9 100644 --- a/src/yuzu/configuration/configure_cpu.h +++ b/src/yuzu/configuration/configure_cpu.h @@ -6,6 +6,9 @@ #include #include #include "yuzu/configuration/configuration_shared.h" +#include "yuzu/configuration/shared_translation.h" + +class QComboBox; namespace Core { class System; @@ -37,13 +40,6 @@ private: std::unique_ptr ui; - ConfigurationShared::CheckState cpuopt_unsafe_unfuse_fma; - ConfigurationShared::CheckState cpuopt_unsafe_reduce_fp_error; - ConfigurationShared::CheckState cpuopt_unsafe_ignore_standard_fpcr; - ConfigurationShared::CheckState cpuopt_unsafe_inaccurate_nan; - ConfigurationShared::CheckState cpuopt_unsafe_fastmem_check; - ConfigurationShared::CheckState cpuopt_unsafe_ignore_global_monitor; - const Core::System& system; const ConfigurationShared::TranslationMap& translations; diff --git a/src/yuzu/configuration/configure_dialog.h b/src/yuzu/configuration/configure_dialog.h index 4f8c1912f..931900b7d 100644 --- a/src/yuzu/configuration/configure_dialog.h +++ b/src/yuzu/configuration/configure_dialog.h @@ -7,7 +7,8 @@ #include #include #include -#include "configuration/configuration_shared.h" +#include "yuzu/configuration/configuration_shared.h" +#include "yuzu/configuration/shared_translation.h" #include "yuzu/vk_device_info.h" namespace Core { diff --git a/src/yuzu/configuration/configure_graphics.h b/src/yuzu/configuration/configure_graphics.h index 9e421d024..718ba54f5 100644 --- a/src/yuzu/configuration/configure_graphics.h +++ b/src/yuzu/configuration/configure_graphics.h @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -14,6 +15,7 @@ #include "common/common_types.h" #include "vk_device_info.h" #include "yuzu/configuration/configuration_shared.h" +#include "yuzu/configuration/shared_translation.h" class QPushButton; class QEvent; diff --git a/src/yuzu/configuration/configure_graphics_advanced.cpp b/src/yuzu/configuration/configure_graphics_advanced.cpp index 61e9b3d69..c5e21da02 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.cpp +++ b/src/yuzu/configuration/configure_graphics_advanced.cpp @@ -8,6 +8,7 @@ #include "ui_configure_graphics_advanced.h" #include "yuzu/configuration/configuration_shared.h" #include "yuzu/configuration/configure_graphics_advanced.h" +#include "yuzu/configuration/shared_translation.h" #include "yuzu/configuration/shared_widget.h" ConfigureGraphicsAdvanced::ConfigureGraphicsAdvanced( diff --git a/src/yuzu/configuration/configure_graphics_advanced.h b/src/yuzu/configuration/configure_graphics_advanced.h index 42634d3ff..90b79f786 100644 --- a/src/yuzu/configuration/configure_graphics_advanced.h +++ b/src/yuzu/configuration/configure_graphics_advanced.h @@ -6,6 +6,7 @@ #include #include #include "yuzu/configuration/configuration_shared.h" +#include "yuzu/configuration/shared_translation.h" namespace Core { class System; diff --git a/src/yuzu/configuration/configure_per_game.h b/src/yuzu/configuration/configure_per_game.h index e43d4df94..4849ac291 100644 --- a/src/yuzu/configuration/configure_per_game.h +++ b/src/yuzu/configuration/configure_per_game.h @@ -15,6 +15,7 @@ #include "vk_device_info.h" #include "yuzu/configuration/config.h" #include "yuzu/configuration/configuration_shared.h" +#include "yuzu/configuration/shared_translation.h" namespace Core { class System; diff --git a/src/yuzu/configuration/configure_system.cpp b/src/yuzu/configuration/configure_system.cpp index 40d0be8ca..5fe3c4a7f 100644 --- a/src/yuzu/configuration/configure_system.cpp +++ b/src/yuzu/configuration/configure_system.cpp @@ -5,6 +5,8 @@ #include #include +#include +#include #include #include #include diff --git a/src/yuzu/configuration/configure_system.h b/src/yuzu/configuration/configure_system.h index c598c07f3..4457ccc21 100644 --- a/src/yuzu/configuration/configure_system.h +++ b/src/yuzu/configuration/configure_system.h @@ -9,7 +9,11 @@ #include #include "yuzu/configuration/configuration_shared.h" +#include "yuzu/configuration/shared_translation.h" +class QCheckBox; +class QLineEdit; +class QComboBox; class QDateTimeEdit; namespace Core { @@ -43,9 +47,6 @@ private: std::unique_ptr ui; bool enabled = false; - ConfigurationShared::CheckState use_rng_seed; - ConfigurationShared::CheckState use_unsafe_extended_memory_layout; - Core::System& system; const ConfigurationShared::TranslationMap& translations; const ConfigurationShared::ComboboxTranslationMap& combobox_translations; diff --git a/src/yuzu/configuration/shared_widget.cpp b/src/yuzu/configuration/shared_widget.cpp index 64e1d90ad..71f4eadbe 100644 --- a/src/yuzu/configuration/shared_widget.cpp +++ b/src/yuzu/configuration/shared_widget.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -8,7 +9,9 @@ #include #include #include +#include #include +#include #include #include #include