Add UI to configure keyboard-to-controller mapping (#308)

* Add UI to configure keyboard-to-controller mapping

* Add an optional "---fix" argument to format-checking script

* clang fix

---------

Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
This commit is contained in:
Vasyl_Baran 2024-09-11 08:51:18 +03:00 committed by GitHub
parent 74c2888aaa
commit fdb13a3b90
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 1436 additions and 173 deletions

View file

@ -17,6 +17,7 @@
#include "game_info.h"
#include "game_list_frame.h"
#include "game_list_utils.h"
#include "keyboardcontrolswindow.h"
#include "main_window_themes.h"
#include "main_window_ui.h"
#include "pkg_viewer.h"
@ -37,6 +38,8 @@ public:
void InstallDirectory();
void StartGame();
std::map<u32, KeysMapping> getKeysMapping();
private Q_SLOTS:
void ConfigureGuiFromSettings();
void SaveWindowState() const;
@ -45,6 +48,7 @@ private Q_SLOTS:
void RefreshGameTable();
void HandleResize(QResizeEvent* event);
void OnLanguageChanged(const std::string& locale);
void ControllerConfigurationButtonPressed();
private:
Ui_MainWindow* ui;
@ -80,6 +84,7 @@ private:
QScopedPointer<ElfViewer> m_elf_viewer;
// Status Bar.
QScopedPointer<QStatusBar> statusBar;
QScopedPointer<KeyboardControlsWindow> m_controllerControlsDialog;
// Available GPU devices
std::vector<QString> m_physical_devices;