mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-11 06:07:58 -05:00
input_profiles: Implement input profiles
This commit is contained in:
@ -16,12 +16,24 @@ class QSettings;
|
||||
|
||||
class Config {
|
||||
public:
|
||||
explicit Config(const std::string& config_loc = "qt-config.ini", bool is_global = true);
|
||||
enum class ConfigType {
|
||||
GlobalConfig,
|
||||
PerGameConfig,
|
||||
InputProfile,
|
||||
};
|
||||
|
||||
explicit Config(const std::string& config_loc = "qt-config",
|
||||
ConfigType config_type = ConfigType::GlobalConfig);
|
||||
~Config();
|
||||
|
||||
void Reload();
|
||||
void Save();
|
||||
|
||||
void ReadControlPlayerValue(std::size_t player_index);
|
||||
void SaveControlPlayerValue(std::size_t player_index);
|
||||
|
||||
const std::string& GetConfigFilePath() const;
|
||||
|
||||
static const std::array<int, Settings::NativeButton::NumButtons> default_buttons;
|
||||
static const std::array<int, Settings::NativeMotion::NumMotions> default_motions;
|
||||
static const std::array<std::array<int, 4>, Settings::NativeAnalog::NumAnalogs> default_analogs;
|
||||
@ -34,7 +46,7 @@ public:
|
||||
|
||||
private:
|
||||
void ReadValues();
|
||||
void ReadPlayerValues();
|
||||
void ReadPlayerValue(std::size_t player_index);
|
||||
void ReadDebugValues();
|
||||
void ReadKeyboardValues();
|
||||
void ReadMouseValues();
|
||||
@ -62,7 +74,7 @@ private:
|
||||
void ReadWebServiceValues();
|
||||
|
||||
void SaveValues();
|
||||
void SavePlayerValues();
|
||||
void SavePlayerValue(std::size_t player_index);
|
||||
void SaveDebugValues();
|
||||
void SaveMouseValues();
|
||||
void SaveTouchscreenValues();
|
||||
@ -111,9 +123,9 @@ private:
|
||||
void WriteSettingGlobal(const QString& name, const QVariant& value, bool use_global,
|
||||
const QVariant& default_value);
|
||||
|
||||
ConfigType type;
|
||||
std::unique_ptr<QSettings> qt_config;
|
||||
std::string qt_config_loc;
|
||||
|
||||
bool global;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user