Skip to content
This repository has been archived by the owner on Mar 14, 2021. It is now read-only.

Gamepadlib 4 SDL support #1

Open
wants to merge 195 commits into
base: mos-sdl2
Choose a base branch
from
Open

Conversation

jacadcaps
Copy link

Implemented gamepad support based on gamepadlib.
Fixed a crash in SDL_Error.

Tested with XB1 and PS4 gamepads and the testgamecontroller. Both work fine. PS4 has the small share/options buttons swapped but that's either gamepadlib or sensors (ran out of time to check, but will fix that).

Did not test rumble and battery but they both should work. Will test and fix those soon if they fail.

@BeWorld2018
Copy link
Collaborator

My lasts tests :

  • SDL_MorphOS_JoystickInit : Joystick Initialization not working correctly in this function after SDL_GAMECONTROLLER_INIT
  • Wait MOS 3.14 to test HID gamepad
  • I can't test function battery here...

@jacadcaps
Copy link
Author

Sorry, I've been away for a while. Will try to address the outstanding issues within the next couple of days.

@jacadcaps
Copy link
Author

Fixed early init - let me know if this is OK now.
Tested x360 battery here - works as expected.

I've also received the aliexpress x360 gamepad, but it does not work :) (does not power on)

@BeWorld2018
Copy link
Collaborator

BeWorld2018 commented Aug 6, 2020

ok it's better but... when i have 2 gamepad.... only 1 is detected.

I find (maybe the problem) "return" here... : https://github.com/jacadcaps/SDL/blob/mos-sdl2/src/joystick/morphos/SDL_sysjoystick.c#L83

Arrff, no chance with aliexpress...

2020-08-06_08h21_40

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants