Commit graph

16 commits

Author SHA1 Message Date
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)