Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to SDL2 for gamepad input #299

Merged
merged 5 commits into from
Feb 12, 2023
Merged

Switch to SDL2 for gamepad input #299

merged 5 commits into from
Feb 12, 2023

Conversation

univrsal
Copy link
Owner

@univrsal univrsal commented Dec 20, 2022

As #297 has shown SDL2 fixes basically all issues we've had with different types of gamepads. This PR will switch both the client as well as the plugin to using SDL2 instead of the old gamepad library.

Things left to do:

  • Switch plugin to sdl2
  • Get basic detection and buttons working
  • Switch client to sdl2 this will be done separately
  • Fix analog sticks, triggers, player id
  • Remove duplicate mutex in input_data and local input data
  • Remove unused last_* event data
  • Cleanup data synchronisation
  • Cleanup gamepad hook code
  • Convert gamepad layouts to new keycodes
  • Use new keycodes in cct

@univrsal univrsal marked this pull request as draft December 20, 2022 23:23
This removes the old gamepad library and instead uses SDL2 for all
gamepad input. This also means that the keycodes for gamepad buttons
have changed. All existing presets have been updated and the config tool
will convert the old codes when loading any preset. So conversion is as
easy as loading a preset and then saving it again.

The client has not been updated for now as there's more refactoring
needed for that.
@univrsal univrsal closed this Jan 6, 2023
@univrsal univrsal deleted the sdl2-gamepad branch January 6, 2023 11:44
@univrsal univrsal restored the sdl2-gamepad branch January 6, 2023 17:00
@univrsal univrsal deleted the sdl2-gamepad branch January 6, 2023 19:54
@univrsal univrsal restored the sdl2-gamepad branch January 7, 2023 01:10
@univrsal univrsal deleted the sdl2-gamepad branch January 7, 2023 04:04
@univrsal univrsal restored the sdl2-gamepad branch January 7, 2023 09:20
@univrsal univrsal deleted the sdl2-gamepad branch January 7, 2023 12:14
@univrsal univrsal restored the sdl2-gamepad branch January 7, 2023 17:30
@univrsal univrsal deleted the sdl2-gamepad branch January 7, 2023 20:24
@univrsal univrsal restored the sdl2-gamepad branch January 8, 2023 01:40
@univrsal univrsal deleted the sdl2-gamepad branch January 8, 2023 04:34
@univrsal univrsal restored the sdl2-gamepad branch January 8, 2023 09:50
@univrsal univrsal deleted the sdl2-gamepad branch January 8, 2023 12:44
@univrsal univrsal restored the sdl2-gamepad branch January 8, 2023 18:00
@univrsal univrsal deleted the sdl2-gamepad branch January 8, 2023 20:54
@univrsal univrsal restored the sdl2-gamepad branch January 9, 2023 02:10
@univrsal univrsal deleted the sdl2-gamepad branch January 9, 2023 05:04
@univrsal univrsal restored the sdl2-gamepad branch January 9, 2023 10:20
@univrsal univrsal deleted the sdl2-gamepad branch January 9, 2023 13:14
@univrsal univrsal restored the sdl2-gamepad branch January 9, 2023 18:30
@univrsal univrsal deleted the sdl2-gamepad branch January 9, 2023 21:24
@univrsal univrsal restored the sdl2-gamepad branch January 10, 2023 02:40
@univrsal univrsal deleted the sdl2-gamepad branch January 10, 2023 05:34
@univrsal univrsal restored the sdl2-gamepad branch January 10, 2023 10:50
@univrsal univrsal deleted the sdl2-gamepad branch January 10, 2023 13:44
@univrsal univrsal deleted the sdl2-gamepad branch January 14, 2023 15:44
@univrsal univrsal restored the sdl2-gamepad branch January 14, 2023 21:00
@univrsal univrsal deleted the sdl2-gamepad branch January 14, 2023 23:54
@univrsal univrsal restored the sdl2-gamepad branch January 15, 2023 05:10
@univrsal univrsal deleted the sdl2-gamepad branch January 15, 2023 08:04
@univrsal univrsal restored the sdl2-gamepad branch January 15, 2023 13:20
@univrsal univrsal deleted the sdl2-gamepad branch January 15, 2023 16:14
@univrsal univrsal restored the sdl2-gamepad branch January 15, 2023 21:30
@univrsal univrsal deleted the sdl2-gamepad branch January 16, 2023 00:24
@univrsal univrsal restored the sdl2-gamepad branch January 16, 2023 05:40
@univrsal univrsal deleted the sdl2-gamepad branch January 16, 2023 08:34
@univrsal univrsal restored the sdl2-gamepad branch January 16, 2023 13:50
@univrsal univrsal deleted the sdl2-gamepad branch January 16, 2023 16:44
@univrsal univrsal restored the sdl2-gamepad branch January 16, 2023 22:00
@univrsal univrsal deleted the sdl2-gamepad branch January 17, 2023 00:54
@univrsal univrsal restored the sdl2-gamepad branch January 17, 2023 06:10
@univrsal univrsal deleted the sdl2-gamepad branch January 17, 2023 09:04
@univrsal univrsal restored the sdl2-gamepad branch January 17, 2023 15:21
@univrsal univrsal deleted the sdl2-gamepad branch January 17, 2023 17:14
@univrsal univrsal restored the sdl2-gamepad branch January 21, 2023 22:27
@univrsal univrsal reopened this Jan 21, 2023
@univrsal univrsal marked this pull request as ready for review February 12, 2023 14:53
@univrsal univrsal merged commit 765b1fd into master Feb 12, 2023
@univrsal univrsal temporarily deployed to github-pages February 13, 2023 17:43 — with GitHub Pages Inactive
@univrsal univrsal deleted the sdl2-gamepad branch March 6, 2023 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant