mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-24 19:36:17 +00:00
Remapping: Documentation and defaults update + add option to use a unified config (#2302)
* Add a toggle to use unified or per-game configs, and add a deadzone example to the default config * Add a checkbox to toggle config type * clang
This commit is contained in:
parent
c4bfaa6031
commit
9aa6c5b951
5 changed files with 36 additions and 6 deletions
|
@ -12,6 +12,7 @@
|
|||
#include "game_info.h"
|
||||
#include "src/sdl_window.h"
|
||||
|
||||
#include <QCheckBox>
|
||||
#include <QCloseEvent>
|
||||
#include <QComboBox>
|
||||
#include <QFile>
|
||||
|
@ -50,7 +51,16 @@ EditorDialog::EditorDialog(QWidget* parent) : QDialog(parent) {
|
|||
// Load all installed games
|
||||
loadInstalledGames();
|
||||
|
||||
QCheckBox* unifiedInputCheckBox = new QCheckBox("Use Per-Game configs", this);
|
||||
unifiedInputCheckBox->setChecked(!Config::GetUseUnifiedInputConfig());
|
||||
|
||||
// Connect checkbox signal
|
||||
connect(unifiedInputCheckBox, &QCheckBox::toggled, this, [](bool checked) {
|
||||
Config::SetUseUnifiedInputConfig(!checked);
|
||||
Config::save(Common::FS::GetUserPath(Common::FS::PathType::UserDir) / "config.toml");
|
||||
});
|
||||
// Create Save, Cancel, and Help buttons
|
||||
Config::SetUseUnifiedInputConfig(!Config::GetUseUnifiedInputConfig());
|
||||
QPushButton* saveButton = new QPushButton("Save", this);
|
||||
QPushButton* cancelButton = new QPushButton("Cancel", this);
|
||||
QPushButton* helpButton = new QPushButton("Help", this);
|
||||
|
@ -58,6 +68,7 @@ EditorDialog::EditorDialog(QWidget* parent) : QDialog(parent) {
|
|||
|
||||
// Layout for the game selection and buttons
|
||||
QHBoxLayout* topLayout = new QHBoxLayout();
|
||||
topLayout->addWidget(unifiedInputCheckBox);
|
||||
topLayout->addWidget(gameComboBox);
|
||||
topLayout->addStretch();
|
||||
topLayout->addWidget(saveButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue