mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-27 13:56:27 -05:00
233a804196
Greatly simplifies the current input UI, while still allowing power users to tweak advanced settings. Adds 'input profiles', which are easy autoconfigurations to make getting started easy and fast. Also has a custom option which brings up the current, full UI.
47 lines
1.3 KiB
C++
47 lines
1.3 KiB
C++
// Copyright 2014 Citra Emulator Project
|
|
// Licensed under GPLv2 or any later version
|
|
// Refer to the license.txt file included.
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <QVariant>
|
|
#include "core/settings.h"
|
|
|
|
class QSettings;
|
|
|
|
class Config {
|
|
public:
|
|
Config();
|
|
~Config();
|
|
|
|
void Reload();
|
|
void Save();
|
|
|
|
static const std::array<int, Settings::NativeButton::NumButtons> default_buttons;
|
|
static const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> default_analogs;
|
|
static const std::array<int, Settings::NativeMouseButton::NumMouseButtons>
|
|
default_mouse_buttons;
|
|
static const std::array<int, Settings::NativeKeyboard::NumKeyboardKeys> default_keyboard_keys;
|
|
static const std::array<int, Settings::NativeKeyboard::NumKeyboardMods> default_keyboard_mods;
|
|
|
|
private:
|
|
void ReadValues();
|
|
void ReadPlayerValues();
|
|
void ReadDebugValues();
|
|
void ReadKeyboardValues();
|
|
void ReadMouseValues();
|
|
void ReadTouchscreenValues();
|
|
void ApplyDefaultProfileIfInputInvalid();
|
|
|
|
void SaveValues();
|
|
void SavePlayerValues();
|
|
void SaveDebugValues();
|
|
void SaveMouseValues();
|
|
void SaveTouchscreenValues();
|
|
|
|
std::unique_ptr<QSettings> qt_config;
|
|
std::string qt_config_loc;
|
|
};
|