-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Sdl motion #10561
Sdl motion #10561
Conversation
You think we should update libusb instead of modifying the code in externals? |
yes, we should update libusb. however, I have some pending PRs on libusb's github repo, so I'm going to give them some time and see if they merge some of them. or we can just update, i guess there's technically no reason to wait :P |
On the topic of SDL: I'm going to try to only build what we need for the wanted motion input support, since the rest is completely unused by dolphin.. update: I was only able to find the |
The title of the pr should also include the "rumble" part |
Works fine except for one issue, which is whenever the controller (in my case a DualShock 4) gets disconnected and reconnected, instead of being readded as "SDL/PS4 Controller", it gets added as "SDL/Wireless Controller", forcing me to restart Dolphin to get the correct device back. |
@ds22x was that with bluetooth disconnection or usb? was it zct1 or zct2 controller model? |
USB, and zct2. |
@ds22x ... actually, it's just that it switches between HIDAPI/WINDOWS driver every other time, not timing related. |
I see. |
i opened an issue about it here libsdl-org/SDL#5543 @ds22x that issue should be fixed now |
Working great with DS4 and Xbox Series X Controllers over bluetooth. |
This needs a rebase. |
It would be great if this can be merged or the submodule stuff split off into its own PR and that gets merged, so we can move away from using brew-installed SDL on the macOS build machine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CMake fails with the current SDL2 commit used by this PR on macOS. There might be some issues with some recent CMake changes on macOS (libsdl-org/SDL#5506), so perhaps it would be best to use the latest release version instead.
Recommended PR title: "Input: Support Controller Rumble and Motion Input through SDL" |
@shuffle2 - I'm assuming the graphical issue just requires a rebase. Is this ready to merge otherwise? Just needing a review? |
i think it's ready to merge, i haven't been pushing for it because i'm not actually that enthusiastic about adding sdl to windows. I'd much rather add the ps4/ps5 specific functionality in dolphin directly. Is this PR really just for ps4/ps5 controllers, or is there some other benefit which makes sdl worth it? |
@shuffle2 - I assumed it also support joycons and switch pro controllers? But not 100% sure. Not sure what else it supports.. |
the non-windows parts of this PR are fine (non-windows is already using sdl). i'd just be surprised if there isn't a simpler way on windows. |
IMO, the amount of code present in the pr you just mentioned is not THAT bad, as compared to adding a new submodule (and if you already eaten the poison, you might as well lick the plate). Although this pr may be more elegant, the other uses the "Apple approved" method. But Apple being Apple, maybe it's best to support both methods, just in case SDL breaks or the other way around. |
@Rumi-Larry macOS technically does not need to use the submodule, though I will submit a separate PR later to use it if this PR is merged. It would greatly simplify the build environment on the build machine, since it needs to have both Intel and arm64 installed at the moment (+ there is a hack on it right now to get the Intel version to be compatible with Mojave, Catalina). The only new code that really applies here is what's in Internally, SDL also uses the "Apple approved" framework that 9745 does for some controllers (MFi). The framework doesn't support a bunch of controllers like Switch Pro and Joy-Cons, so SDL uses another method to get those to work, which I think is a big benefit for this PR. |
rebase? |
Can this be rebased? Would be nice to have. |
i will rebase it and you can merge it; i still think sdl is absolutely abysmal code and it's a shame to use it |
other things (like SDL) may try to use "Message"
fixes window message pumping
this is just #10000 , but rebased on master, msbuild stuff fixed, and some tweaks:
i tested that ps4 zct1, zct2 controllers and ps5 zct1 controller work as expected over usb (haven't tried bt).