Commit Graph

18 Commits

Author SHA1 Message Date
Shanoah Alkire b270c1bb67 onepad: Cleanup in a few places. 2019-04-28 01:36:43 -07:00
Gregory Hainaut d6c27c190d onepad: fallback on 2nd gamepad for the 2nd player
Close #2039
2017-08-10 22:00:28 +02:00
Gregory Hainaut 5b4c948e43 onepad: clean the gamepad/joystick interface
Remove return of empty function
Use final/override qualifier
Remove useless virtual

Thanks turtleli for the advices
2017-04-28 11:27:19 +02:00
Gregory Hainaut 31d8142a0d onepad: plug uid instead of the index
ini must be recreated
2017-04-28 11:27:19 +02:00
Gregory Hainaut 3cff588eff onepad: add an unique identifier 2017-04-28 11:27:19 +02:00
Gregory Hainaut 1b369520ed onepad: drop the pad if an error was detected
v2:
init m_no_error in gamepad constructor
2017-04-28 11:27:19 +02:00
Gregory Hainaut 2e09c7faf3 onepad: Move init/destroy code to constructor/destructor
* prefix remaining member with m_
* Use array for m_effect_id
* Properly Destroy/Close Haptic/Joystick/Game Controller
 (except on older SDL versions which are buggy)
2017-04-28 11:27:19 +02:00
Gregory Hainaut 9da843c994 onepad: plug SDL2 API game controller 2017-04-28 11:27:19 +02:00
Gregory Hainaut 94e19ac903 onepad: remove SDL1 manual detection code path 2017-04-28 11:27:19 +02:00
Gregory Hainaut 5c537fdbe3 onepad: properly indent comments
Clang-format doesn't like the double *
2017-04-28 11:27:19 +02:00
Gregory Hainaut 9c7e9cc6f2 onepad: use range loop and vector of unique_ptr to manage the joystick 2017-04-28 11:27:19 +02:00
Clang Format 604d3bac3c clang format: set SpacesBeforeTrailingComments to 1 2016-10-16 21:42:31 +02:00
Clang Format f06f44c30a reformat onepad 2016-09-08 21:52:49 +02:00
Gregory Hainaut 39bf84a13c onepad: don't duplicate the "GamePad" base class code/member in the "JoystickInfo" derivated class 2016-08-12 22:37:37 +02:00
kust2708 823a37aed7 OnePad : New GUI based on gwWidget
Buttons done, configuration initialization done.
Still need to add Gamepad and Joysticks configuration frames.
Require png file for the moment (the embedded picture will be fixed after).

New Onepad GUI based on wxWidget (Main frame almost finish)
Background picture is now embedded
Button binding works
Loading and saving works
Need to add feedback and gamepad, joysticks configuration frame

Modification of the onepad CMakeList.txt
Automatic generation of images headers using perl script

Modification of the test feedback function
2016-02-14 17:26:31 +01:00
Gregory Hainaut ac0e40a2b7 onepad: safely dispatch rumble action
Fix onepad crashes
2015-11-10 08:12:20 +01:00
3kinox d7155f839f onepad:
+ Implement and activate rumble.
2015-10-16 23:55:18 +02:00
3kinox fb0d7139f2 onepad:
+ Isolate every SDL code paths and replace any call to them by call to a generic class "GamePad" of which JoystickInfo is now a child.
+ Now backends can be added by inheriting GamePad generic class.
+ There is just one function change which is redundant with next commits but otherwise commit will not compile(which is more evil).
2015-10-16 23:53:51 +02:00