diff options
Diffstat (limited to 'src/yuzu/configuration/config.h')
-rw-r--r-- | src/yuzu/configuration/config.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/src/yuzu/configuration/config.h b/src/yuzu/configuration/config.h index ae3e36a11..06fa7d2d0 100644 --- a/src/yuzu/configuration/config.h +++ b/src/yuzu/configuration/config.h @@ -1,6 +1,5 @@ -// Copyright 2014 Citra Emulator Project -// Licensed under GPLv2 or any later version -// Refer to the license.txt file included. +// SPDX-FileCopyrightText: 2014 Citra Emulator Project +// SPDX-License-Identifier: GPL-2.0-or-later #pragma once @@ -26,7 +25,7 @@ public: InputProfile, }; - explicit Config(Core::System& system_, const std::string& config_name = "qt-config", + explicit Config(const std::string& config_name = "qt-config", ConfigType config_type = ConfigType::GlobalConfig); ~Config(); @@ -42,6 +41,7 @@ public: static const std::array<int, Settings::NativeMotion::NumMotions> default_motions; static const std::array<std::array<int, 4>, Settings::NativeAnalog::NumAnalogs> default_analogs; static const std::array<int, 2> default_stick_mod; + static const std::array<int, 2> default_ringcon_analogs; static const std::array<int, Settings::NativeMouseButton::NumMouseButtons> default_mouse_buttons; static const std::array<int, Settings::NativeKeyboard::NumKeyboardKeys> default_keyboard_keys; @@ -66,6 +66,8 @@ private: void ReadMouseValues(); void ReadTouchscreenValues(); void ReadMotionTouchValues(); + void ReadHidbusValues(); + void ReadIrCameraValues(); // Read functions bases off the respective config section names. void ReadAudioValues(); @@ -86,6 +88,7 @@ private: void ReadUIGamelistValues(); void ReadUILayoutValues(); void ReadWebServiceValues(); + void ReadMultiplayerValues(); void SaveValues(); void SavePlayerValue(std::size_t player_index); @@ -93,6 +96,8 @@ private: void SaveMouseValues(); void SaveTouchscreenValues(); void SaveMotionTouchValues(); + void SaveHidbusValues(); + void SaveIrCameraValues(); // Save functions based off the respective config section names. void SaveAudioValues(); @@ -113,6 +118,7 @@ private: void SaveUIGamelistValues(); void SaveUILayoutValues(); void SaveWebServiceValues(); + void SaveMultiplayerValues(); /** * Reads a setting from the qt_config. @@ -156,8 +162,8 @@ private: * * @param The setting */ - template <typename Type> - void ReadGlobalSetting(Settings::Setting<Type>& 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 @@ -165,8 +171,8 @@ private: * * @param The setting */ - template <typename Type> - void WriteGlobalSetting(const Settings::Setting<Type>& 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 @@ -174,22 +180,20 @@ private: * * @param The setting */ - template <typename Type> - void ReadBasicSetting(Settings::BasicSetting<Type>& 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> - void WriteBasicSetting(const Settings::BasicSetting<Type>& setting); + template <typename Type, bool ranged> + void WriteBasicSetting(const Settings::Setting<Type, ranged>& setting); ConfigType type; std::unique_ptr<QSettings> qt_config; std::string qt_config_loc; bool global; - - Core::System& system; }; // These metatype declarations cannot be in common/settings.h because core is devoid of QT |