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

platforms/joystick: replace sdl with 0xcafed00d/joystick package #988

Merged
merged 13 commits into from
Sep 23, 2023

Conversation

deadprogram
Copy link
Member

@deadprogram deadprogram commented Sep 9, 2023

Solved issues and/or description of the change

This PR is to address #986 by replacing SDL with the much simpler package https://github.com/0xcafed00d/joystick

Manual test

Already tested Dualshock 3 on both Linux and macOS. Will test Windows this weekend.

Checklist

  • The PR's target branch is 'hybridgroup:dev'
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes (e.g. by run make test)
  • No linter errors exist locally (e.g. by run make fmt_check)
  • I have performed a self-review of my own code

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (beaefb7) 71.50% compared to head (a774e4c) 71.50%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #988   +/-   ##
=======================================
  Coverage   71.50%   71.50%           
=======================================
  Files          88       88           
  Lines        7352     7352           
=======================================
  Hits         5257     5257           
  Misses       1475     1475           
  Partials      620      620           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

platforms/joystick/joystick_adaptor.go Outdated Show resolved Hide resolved
platforms/joystick/joystick_adaptor_test.go Outdated Show resolved Hide resolved
platforms/joystick/joystick_adaptor_test.go Outdated Show resolved Hide resolved
platforms/joystick/joystick_driver.go Outdated Show resolved Hide resolved
platforms/joystick/joystick_driver.go Show resolved Hide resolved
.circleci/config.yml Show resolved Hide resolved
platforms/joystick/bin/scanner.go Outdated Show resolved Hide resolved
platforms/joystick/joystick_driver_test.go Show resolved Hide resolved
d := initTestDriver("./configs/xbox360_power_a_mini_proex.json")
_ = d.Start()
d, tj := initTestDriver("./configs/dualshock3.json")
tj.axisCount = 6
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tj.axisCount = 6
tj.axisCount = 6 // corresponding to the content of json config

platforms/joystick/joystick_driver.go Show resolved Hide resolved
@deadprogram
Copy link
Member Author

deadprogram commented Sep 16, 2023

I've now also added the mappings for dualshock4.

I don't have any working setup for any other joysticks then these 2 at the moment, but this should handle many people, and the new scanner will help handle the others for people who have those setups.

@gen2thomas
Copy link
Collaborator

gen2thomas commented Sep 23, 2023

@deadprogram nice work, I'm going to merge now!

@gen2thomas gen2thomas merged commit cd653e9 into dev Sep 23, 2023
1 check passed
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.

3 participants