Commit graph

29 commits

Author SHA1 Message Date
Leon Styhre a443f86235 Removed a huge amount of unnecessary Window* function arguments. 2022-01-19 18:01:54 +01:00
Leon Styhre 254b00a3d8 Large refactoring to improve thread safety and improve singleton pattern usage. 2022-01-04 21:21:26 +01:00
Leon Styhre 0fdd169835 Fixed a compile error on BSD Unix. 2021-12-01 19:10:17 +01:00
Leon Styhre 8373d59e29 (macOS) All dependencies are now built in-tree. 2021-11-30 22:14:18 +01:00
Leon Styhre 3669d2320c Added info popups when adding and removing input devices. 2021-10-07 18:33:13 +02:00
Leon Styhre 23fdc00044 Formatted the es-core source tree using clang-format. 2021-07-07 20:31:46 +02:00
Leon Styhre aa67020326 (Windows) Fixed an MSVC compiler warning. 2021-07-04 21:34:21 +02:00
Leon Styhre 52e12da55a Fixed an issue where the joystick counter would not decrease when removing a controller. 2021-07-03 12:24:23 +02:00
Leon Styhre 3185083ca5 Added separate controller deadzone values for the triggers and thumbsticks. 2021-07-01 17:39:08 +02:00
Leon Styhre e0e1cff787 Removed controllers are now logged to es_log.txt in the same manner as added controllers.
Also renamed two functions and changed a variable that had an incorrect and confusing name.
2021-06-26 22:54:30 +02:00
Leon Styhre 57280c5da9 Changed es_input.cfg to es_input.xml 2021-06-16 19:20:53 +02:00
Leon Styhre 0bde8dc79d Migrated to the SDL2 GameController API. 2021-05-22 22:18:00 +02:00
Leon Styhre adaec71f5b Some minor code cleanup. 2021-03-19 18:25:37 +01:00
Leon Styhre 48a7bed2c0 Fixed compilation errors on Fedora and GCC 10. 2020-11-28 22:27:00 +01:00
Leon Styhre 8db04c5fcb Added SPDX license identifiers to all source files. 2020-09-21 19:17:34 +02:00
Leon Styhre 1b65eaac2e Improved input device configuration.
Default keyboard mappings are now applied if the user has not configured the keyboard.
2020-07-14 19:16:21 +02:00
Leon Styhre 76aa239855 Initial update to make the application build and run on Windows.
Much more work will be needed to get the Windows port working properly.
2020-07-03 20:23:51 +02:00
Leon Styhre eeae8033bd Use SDL2 include files instead of those for SDL version 1.
This resolves an irritating issue in the code editor where SDL2-specific functions could't be found. Not entirely sure about the SDL include file logic for other operating systems than Linux so the #ifdef directives may need to be updated further at a later date.
2020-06-26 18:03:55 +02:00
Leon Styhre 67aa6b3dbd Huge code cleanup and code documentation update.
Includes lots of conversions from tabs to spaces. Only cosmetic code changes in this commit.
2020-06-21 14:25:28 +02:00
Conn O'Griofa 03341f236d Implement filterTrigger for PS3 controllers
The hid-sony driver has both analog and digital buttons for the triggers,
and the analog values range from -32767 to 32767, which can cause two unwanted
input events (digital button and negative axis) per press.

Implement a function to filter out unwanted input events during configuration,
but isolate detection to known PS3 controllers with 6 axes so that older versions
of hid-sony and the sixad driver (which use 25+ axes) are not impacted negatively.
2019-04-06 11:19:12 +01:00
Jools Wills 945a4c9cfd
Revert "InputManager: improve trigger axis calibration" 2019-04-06 02:33:16 +01:00
Conn O'Griofa b097648dde InputManager: improve trigger axis calibration
Some drivers (such as hid-sony) configure analog triggers (L2/R2) as axes
with axis range -32768-32767, but the resting value starts at -32768,
causing an initial or light press to register erroneously as a minus
axis value.

Fix by shifting ABS_Z and ABS_RZ axes that are detected to rest at
-32768 so that they will range from 0-32767 instead.

Patch based on Jools Wills' earlier commit: https://github.com/RetroPie/EmulationStation/pull/58
2018-06-08 04:45:04 +00:00
Tomas Jakobsson 074e22ee37 CEC Support 2017-11-08 23:22:15 +01:00
Tomas Jakobsson a8fc560749 Header inclusion cleanup 2017-11-02 19:16:01 +01:00
Tomas Jakobsson 44e3e39083 Add pragma once and ifndef header guards to all headers 2017-10-31 18:12:50 +01:00
Jools Wills 3eba889bdf Revert "workaround for analogue trigger configuration - eg with xpad." 2016-08-14 20:24:39 +01:00
Jools Wills c5b74947a0 workaround for analogue trigger configuration - eg with xpad.
Unlike other axis, they don't default to 0, but instead start at -32768 and go to +32767 when pressed. This confuses the
current ES code axis code. As a workaround, we get the initial value and if it is -32767, we add 32767 and divide by two. This gives it
a range that can be handled with the current code (from 0 to 32767). Note on my X11 machine, I had to plug the joystick in after ES
was loaded or it get 0 as the initial axis value for the triggers. This seems ok on the RPI though, so possible some SDL issue.

With this change on a 360 controller the triggers should be correctly detected as +2 and +5 without seeing two presses for each trigger press.
2016-08-13 01:49:44 +01:00
Florian 65f2409d91 CHG: Additional input types, user-defined input config scripts 2015-06-01 20:47:42 +02:00
Aloshi dbdbcde6cd Renamed folders to match their projects properly. 2014-06-20 20:03:05 -05:00
Renamed from core/src/InputManager.h (Browse further)