Closed askryan closed 6 months ago
Steam uses SDL for controllers. Does this not work with testcontroller in the SDL main repo?
I'll try that right now
I'm sorry I'm new to github and I'm not really sure about what I should do. I cloned the repository and downloaded it, how would I run testcontroller?
What OS and build environment are you using?
I am using Windows 11, Build 23H2
I downloaded visual studio community. To run testcontroller, do I run the SDL.sln file located in the VisualC-GDK folder?
Open the one in the VisualC directory, it'll have testcontroller as one of the targets you can build.
I built testcontroller
Did I do something wrong?
I'm sorry for taking up your time, I was just told to create an issue by someone in the Cemu discord if I wanted SDL to add support for the controller
Nope, it built successfully. You want to right click on testcontroller and set it as startup project and then hit F5 to run it.
With your help, I finally got the program to run, and everything (including the gyro) seems to be functioning properly. I'm not sure why the buttons won't register in Cemu. Here's a video of me pressing different buttons and the mapping not registering in cemu
https://github.com/libsdl-org/SDL/assets/79998400/e7d7dddd-b6a4-4182-b47e-8ee0b94ba467
cemu may be using an older version of SDL.
You can grab the latest SDL DLL from the latest release and replace the SDL2.dll in cemu and see if that fixes it. If cemu is 32-bit you'll want this: https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-2.30.1-win32-x86.zip otherwise you'll want this: https://github.com/libsdl-org/SDL/releases/download/release-2.30.1/SDL2-2.30.1-win32-x64.zip
Oddly enough, the motion controls randomly started working and I can now use them in cemu games (without me changing the SDL version). Thank you so much for your assistance today. I wonder what caused it to suddenly start working
Well, great! :)
I wonder what caused it to suddenly start working
Hi askryan, welcome.
testcontroller uses hints SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE
& SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE
enable extended inputs on the controller, so LED, sensors and rumble work, and they stay enabled until the controller is powered down. I'm guessing that behaviour is specific to PS controllers, but I wonder if something similar is happening for your switch controller when HIDAPI opens it? Does it still work after the controller is turned off and on again?
Hello AntTheAlchemist,
I have found that motion controls continue to work even when the controller is powered off and on again. However, it may be possible that using testcontroller triggered something that allowed extended inputs to be detected. Another possibility I thought of was that using testcontroller may have caused the controller I had to be detected as an official switch pro controller, which is supported by the SDL API, while before it was just detected as the PXN P50L, which doesn't have official support built into SDL.
But then again, the gyro was detected on Steam even before I tried all this stuff, so maybe none of these theories are correct.
The PXN P50L (product linked below) has motion control support, and I've tested it and found that the gyro works in Steam games. Would you guys be able to add it to SDL so it could be used for motion controls in CEMU?
Amazon link to product Official website description of controller