2022-11-18 01:23:48 +01:00
|
|
|
// SPDX-FileCopyrightText: 2022 yuzu Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
2022-11-19 21:39:09 +01:00
|
|
|
#include "ui_configure_input_per_game.h"
|
|
|
|
#include "yuzu/configuration/input_profiles.h"
|
|
|
|
|
|
|
|
class QComboBox;
|
|
|
|
|
2022-11-18 01:23:48 +01:00
|
|
|
namespace Core {
|
|
|
|
class System;
|
2022-11-19 21:39:09 +01:00
|
|
|
} // namespace Core
|
2022-11-18 01:23:48 +01:00
|
|
|
|
2022-11-19 21:39:09 +01:00
|
|
|
class Config;
|
2022-11-18 01:23:48 +01:00
|
|
|
|
|
|
|
class ConfigureInputPerGame : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2022-11-19 21:39:09 +01:00
|
|
|
explicit ConfigureInputPerGame(Core::System& system_, Config* config_,
|
|
|
|
QWidget* parent = nullptr);
|
2022-11-18 01:23:48 +01:00
|
|
|
|
2022-11-18 02:11:47 +01:00
|
|
|
/// Load and Save configurations to settings file.
|
2022-11-18 01:23:48 +01:00
|
|
|
void ApplyConfiguration();
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// Load configuration from settings file.
|
|
|
|
void LoadConfiguration();
|
|
|
|
|
2022-11-18 02:11:47 +01:00
|
|
|
/// Save configuration to settings file.
|
|
|
|
void SaveConfiguration();
|
|
|
|
|
2022-11-18 01:23:48 +01:00
|
|
|
std::unique_ptr<Ui::ConfigureInputPerGame> ui;
|
|
|
|
std::unique_ptr<InputProfiles> profiles;
|
|
|
|
|
2022-11-18 02:11:47 +01:00
|
|
|
std::array<QComboBox*, 8> profile_comboboxes;
|
|
|
|
|
2022-11-18 01:23:48 +01:00
|
|
|
Core::System& system;
|
2022-11-19 21:39:09 +01:00
|
|
|
Config* config;
|
2022-11-18 01:23:48 +01:00
|
|
|
};
|