Ryujinx-git/Ryujinx/Ui/Windows
Jose Padilla ad7d22777f
Controller Input handling refactoring (#1751)
* This should fix issue #1374 in Linux

Changes:
- Bind buttons by detecting the transition from down to up.
- Bind axis by detecting movement from value higher than 50% to a value lower than 50%.

Caveats:
- I have tested only with DS3 in Linux (Fedora 32).
- ZL and ZR detection works by accident. This code doesn't take negative axis into account.
  The reason it works is because axis are managed in absolute value. So when pressing ZL/ZR
  axis value goes from -1 to 1 (or 1 to 0 and back to 1) and this hits the axis detector.
- Likely I have broken all the other controllers xD (testing needed).

* Assign keyboardPressed

* Make a more robust detection of pressed buttons when using a controller

* Add interface to bind buttons from Joystick and Keyboard

* Fix style issues after code review by @AcK77  (Thanks!)

* Move new classes to Ryujinx.Ui.Input namespace

* Use explicit types instead of var

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Mary <thog@protonmail.com>

* Update Ryujinx/Ui/Input/JoystickButtonAssigner.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Add a new empty line before

* Up

Co-authored-by: Jose Padilla <jose@prensalink.com>
Co-authored-by: Mary <thog@protonmail.com>
Co-authored-by: Ac_K <Acoustik666@gmail.com>
2021-02-21 00:22:55 +01:00
..
AboutWindow.cs Fix Linux Icon (#1927) 2021-01-19 07:33:58 +11:00
AboutWindow.Designer.cs gui: Refactoring Part 1 (#1859) 2021-01-08 09:14:13 +01:00
ControllerWindow.cs Controller Input handling refactoring (#1751) 2021-02-21 00:22:55 +01:00
ControllerWindow.glade GUI Update: Fix controller input window to fit all images without scrolling (#1962) 2021-01-26 16:08:22 +11:00
DlcWindow.cs gui: Refactoring Part 1 (#1859) 2021-01-08 09:14:13 +01:00
DlcWindow.glade gui: Refactoring Part 1 (#1859) 2021-01-08 09:14:13 +01:00
SettingsWindow.cs Make windows DPI aware to display properly on high-resolution screens. (#1983) 2021-02-20 01:34:41 +01:00
SettingsWindow.glade Hide Cursor On Idle (#1993) 2021-02-15 22:48:21 +01:00
TitleUpdateWindow.cs gui: Refactoring Part 1 (#1859) 2021-01-08 09:14:13 +01:00
TitleUpdateWindow.glade gui: Refactoring Part 1 (#1859) 2021-01-08 09:14:13 +01:00