diff options
Diffstat (limited to 'src/yuzu/configuration/config.h')
-rw-r--r-- | src/yuzu/configuration/config.h | 64 |
1 files changed, 11 insertions, 53 deletions
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index 1211389d27..0ac74c8e72 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h @@ -52,7 +52,7 @@ public: static const std::map<Settings::AntiAliasing, QString> anti_aliasing_texts_map; static const std::map<Settings::ScalingFilter, QString> scaling_filter_texts_map; static const std::map<bool, QString> use_docked_mode_texts_map; - static const std::map<Settings::GPUAccuracy, QString> gpu_accuracy_texts_map; + static const std::map<Settings::GpuAccuracy, QString> gpu_accuracy_texts_map; static const std::map<Settings::RendererBackend, QString> renderer_backend_texts_map; static const std::map<Settings::ShaderBackend, QString> shader_backend_texts_map; @@ -74,7 +74,6 @@ private: void ReadKeyboardValues(); void ReadMouseValues(); void ReadTouchscreenValues(); - void ReadMousePanningValues(); void ReadMotionTouchValues(); void ReadHidbusValues(); void ReadIrCameraValues(); @@ -99,13 +98,13 @@ private: void ReadUILayoutValues(); void ReadWebServiceValues(); void ReadMultiplayerValues(); + void ReadNetworkValues(); void SaveValues(); void SavePlayerValue(std::size_t player_index); void SaveDebugValues(); void SaveMouseValues(); void SaveTouchscreenValues(); - void SaveMousePanningValues(); void SaveMotionTouchValues(); void SaveHidbusValues(); void SaveIrCameraValues(); @@ -141,18 +140,6 @@ private: QVariant ReadSetting(const QString& name, const QVariant& default_value) const; /** - * Only reads a setting from the qt_config if the current config is a global config, or if the - * current config is a custom config and the setting is overriding the global setting. Otherwise - * it does nothing. - * - * @param setting The variable to be modified - * @param name The setting's identifier - * @param default_value The value to use when the setting is not already present in the config - */ - template <typename Type> - void ReadSettingGlobal(Type& setting, const QString& name, const QVariant& default_value) const; - - /** * Writes a setting to the qt_config. * * @param name The setting's idetentifier @@ -166,50 +153,20 @@ private: void WriteSetting(const QString& name, const QVariant& value, const QVariant& default_value, bool use_global); - /** - * Reads a value from the qt_config and applies it to the setting, using its label and default - * value. If the config is a custom config, this will also read the global state of the setting - * and apply that information to it. - * - * @param The setting - */ - template <typename Type, bool ranged> - void ReadGlobalSetting(Settings::SwitchableSetting<Type, ranged>& setting); - - /** - * Sets a value to the qt_config using the setting's label and default value. If the config is a - * custom config, it will apply the global state, and the custom value if needed. - * - * @param The setting - */ - template <typename Type, bool ranged> - void WriteGlobalSetting(const Settings::SwitchableSetting<Type, ranged>& setting); - - /** - * Reads a value from the qt_config using the setting's label and default value and applies the - * value to the setting. - * - * @param The setting - */ - template <typename Type, bool ranged> - void ReadBasicSetting(Settings::Setting<Type, ranged>& setting); - - /** Sets a value from the setting in the qt_config using the setting's label and default value. - * - * @param The setting - */ - template <typename Type, bool ranged> - void WriteBasicSetting(const Settings::Setting<Type, ranged>& setting); + void ReadCategory(Settings::Category category); + void WriteCategory(Settings::Category category); + void ReadSettingGeneric(Settings::BasicSetting* const setting); + void WriteSettingGeneric(Settings::BasicSetting* const setting) const; - ConfigType type; + const ConfigType type; std::unique_ptr<QSettings> qt_config; std::string qt_config_loc; - bool global; + const bool global; }; // These metatype declarations cannot be in common/settings.h because core is devoid of QT -Q_DECLARE_METATYPE(Settings::CPUAccuracy); -Q_DECLARE_METATYPE(Settings::GPUAccuracy); +Q_DECLARE_METATYPE(Settings::CpuAccuracy); +Q_DECLARE_METATYPE(Settings::GpuAccuracy); Q_DECLARE_METATYPE(Settings::FullscreenMode); Q_DECLARE_METATYPE(Settings::NvdecEmulation); Q_DECLARE_METATYPE(Settings::ResolutionSetup); @@ -218,3 +175,4 @@ Q_DECLARE_METATYPE(Settings::AntiAliasing); Q_DECLARE_METATYPE(Settings::RendererBackend); Q_DECLARE_METATYPE(Settings::ShaderBackend); Q_DECLARE_METATYPE(Settings::AstcRecompression); +Q_DECLARE_METATYPE(Settings::AstcDecodeMode); |