mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2025-06-25 11:56:18 +00:00
add controller remapping GUI (#2311)
* Initial Version - controller remapping GUI * rework saving to allow for multiple outputs to an input * License header * Remove PS logo from image * Add per game checkbox, fix filename, better whitespace deletion * Reorganize variables, correctly set common config label when selected * Add option to unmap, set mapping to unmapped when config entry is absent * Add XBox labels * Remove parsing from save function, make window more compact * Fix typo * Code cleanup * Additional cleanup --------- Co-authored-by: rainmakerv2 <30595646+jpau02@users.noreply.github.com>
This commit is contained in:
parent
97441b62d1
commit
e0d85a7e58
8 changed files with 1937 additions and 2 deletions
52
src/qt_gui/control_settings.h
Normal file
52
src/qt_gui/control_settings.h
Normal file
|
@ -0,0 +1,52 @@
|
|||
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
#include <QDialog>
|
||||
#include "game_info.h"
|
||||
|
||||
namespace Ui {
|
||||
class ControlSettings;
|
||||
}
|
||||
|
||||
class ControlSettings : public QDialog {
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ControlSettings(std::shared_ptr<GameInfoClass> game_info_get,
|
||||
QWidget* parent = nullptr);
|
||||
~ControlSettings();
|
||||
|
||||
private Q_SLOTS:
|
||||
void SaveControllerConfig(bool CloseOnSave);
|
||||
void SetDefault();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui::ControlSettings> ui;
|
||||
std::shared_ptr<GameInfoClass> m_game_info;
|
||||
|
||||
void AddBoxItems();
|
||||
void SetUIValuestoMappings();
|
||||
void GetGameTitle();
|
||||
|
||||
const std::vector<std::string> ControllerInputs = {
|
||||
"cross", "circle", "square", "triangle", "l1",
|
||||
"r1", "l2", "r2", "l3",
|
||||
|
||||
"r3", "options", "pad_up",
|
||||
|
||||
"pad_down",
|
||||
|
||||
"pad_left", "pad_right", "axis_left_x", "axis_left_y", "axis_right_x",
|
||||
"axis_right_y", "back"};
|
||||
|
||||
const QStringList ButtonOutputs = {"cross", "circle", "square", "triangle", "l1",
|
||||
"r1", "l2", "r2", "l3",
|
||||
|
||||
"r3", "options", "pad_up",
|
||||
|
||||
"pad_down",
|
||||
|
||||
"pad_left", "pad_right", "touchpad", "unmapped"};
|
||||
|
||||
const QStringList StickOutputs = {"axis_left_x", "axis_left_y", "axis_right_x", "axis_right_y",
|
||||
"unmapped"};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue