Commit graph

34 commits

Author SHA1 Message Date
Admiral H. Curtiss
5e6e61c723
InputCommon/SDL: Avoid potential infinite loops from integer truncation. 2024-01-15 15:19:24 +01:00
Martino Fontana
51e05f468a SDL: Add GameController API, cleanup 2024-01-13 16:10:25 +01:00
TellowKrinkle
72eadc6520 InputCommon:SDL: Add SDL 2.26 left and right motion inputs 2022-11-24 15:12:07 -06:00
Jordan Woyak
44a4573303 ControllerInterface: Add InputBackend interface and SDL implementation. 2022-11-01 21:59:08 -05:00
Shawn Hoffman
3f7a2c6d4d ci/sdl: minor cleanup 2022-07-10 15:39:06 -07:00
Jun Bo Bi
6cb936d0cf Add SDL motion input and rumble support 2022-07-10 14:49:49 -07:00
Pierre Bourdon
e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
2021-07-05 04:35:56 +02:00
Shawn Hoffman
7e1df34735 rename InputCommon/ControllerInterface/Device to CoreDevice 2021-01-27 14:29:48 -08:00
Lioncash
ec60027f56 InputCommon: Use nested namespace specifiers where applicable 2019-06-17 16:51:41 -04:00
Jordan Woyak
0bdfa19650 ControllerInterface: SDL: Replace unclear bool parameter with enum class. 2019-03-17 08:53:53 -05:00
Jordan Woyak
4fb68c530b ControllerInterface: SDL cleanup and FF effect fixes. 2019-03-17 08:53:13 -05:00
Michael M
932ca644aa Add hotplug support to SDL2 controller backend 2018-06-04 17:50:08 +02:00
Michael M
7062967b5b SDLJoystick: store name on creation
Otherwise, Dolphin will crash when the joystick is removed.
2018-06-04 17:49:21 +02:00
Michael Maltese
3e69d066f5 ControllerInterface: replace Reinitialize with RefreshDevices
The SDL backend crashes when you close a joystick after SDL_Quit has
been called. Some backends don't need to be shutdown and
re-initialized everytime, we can just ask to enumerate devices again.
2016-11-30 16:07:55 -08:00
Léo Lam
788e19f54d ControllerInterface: Make the ID assigning code common
This makes the device ID assigning code common to all backends, by
moving it to AddDevice() instead of copy-pasting or replicating
the logic in the backends.

Also, to prepare for hotplugging, instead of relying on a name usage
count, the new ID assigning system always starts from ID 0 and tries
to assign the first ID that is not used.
2016-07-14 10:50:53 +02:00
Léo Lam
fd29e5c4cc ControllerInterface: Don't pass m_devices to the backends
Previously, the devices vector would be passed to all backends. They
would then manually push_back to it to add new devices. This was fine
but caused issues when trying to add synchronisation.

Instead, backends now call AddDevice() to fill m_devices so that it is
not accessible from the outside.
2016-06-25 13:46:53 +02:00
Pierre Bourdon
3570c7f03a Reformat all the things. Have fun with merge conflicts. 2016-06-24 10:43:46 +02:00
Matthew Parlane
9e1aab663f Revert "SDL: handle SDL_QUIT event" 2015-06-08 13:43:39 +12:00
Tillmann Karras
9ec5a4544f SDL: handle SDL_QUIT event
Using SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS which installs a signal
handler for SIGINT and SIGTERM. There will be a way to prevent this in
2.0.4 but for now we'll need to handle SDL_QUIT.
2015-06-05 19:34:06 +02:00
Tillmann Karras
30ebb2459e Set copyright year to when a file was created 2015-05-25 13:22:31 +02:00
Tillmann Karras
cefcb0ace9 Update license headers to GPLv2+ 2015-05-25 13:22:31 +02:00
Ryan Houdek
817abdd579 Remove an assumption in SDL.
We can compile with haptic support, and then not initialize due to haptics not being available.
So if we are compiling with haptics, test initializing with haptics and if that fails attempt to initialize without haptics before bailing out.
2015-01-19 16:07:28 -06:00
Adam D. Moss
f47cce2210 SDL: Refactor the SDL haptic effects a little. 2015-01-08 15:17:29 +00:00
Karol Herbst
17ad68ff86 SDL: more global memset 2015-01-08 13:37:06 +01:00
Adam Moss
306c8d14db SDL Input: Support more types of force feedback for controllers through SDL. 2015-01-06 19:17:43 +00:00
comex
fba3abe4cf Manually revert d34418100b 2014-12-20 00:33:15 -05:00
Jasper St. Pierre
1b3d0173f5 SDL: Apply updates immediately rather than going through UpdateOutput
We're going to remove UpdateOutput as it's redundant, and horribly
complicates the code.
2014-11-28 10:54:03 -08:00
Jasper St. Pierre
f2787f620e ControllerInterface: Make UpdateInput / UpdateOutput return void
The return values here have never been checked, so it doesn't make sense
to return a value to begin with.
2014-11-28 10:50:45 -08:00
Tillmann Karras
f28116b7da clang-modernize -add-override 2014-03-09 21:12:01 +01:00
Lioncash
2afe215271 Convert all includes to relative paths. 2014-02-18 02:19:10 -05:00
Lioncash
3fd87a7636 Second and final pass of clearing out tabs. 2014-02-17 02:19:41 -05:00
lioncash
d2038049f5 Replace all include guard ifdefs with "#pragma once" 2014-02-10 18:07:16 -05:00
Lioncash
ebb48d019e Clean up some struct indentations
Also cleaned up the indentations of some variable declarations.
2014-02-09 19:40:11 -05:00
Jasper St. Pierre
34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00
Renamed from Source/Core/InputCommon/Src/ControllerInterface/SDL/SDL.h (Browse further)