-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
Gamepad issues #297
Comments
seems to work fine for me, even with everything else connected |
Thanks for testing, since your issue was a crash we'll have to see if the problem was really fixed once I switch the plugin to sdl |
I don't think that testing via WINE would be a fair test of how the native Linux SDL performs, but SDL2 stuff works perfectly on my system and I think porting to SDL2 would probably fix all my issues. Would be happy to help test anything or provide some code changes as well depending on what's needed. FWIW, since Nintendo Switch controller support is relatively new on Linux, a lot of things don't properly support it (mapping the buttons wrong under the assumption it's just an Xbox controller), although SDL2 actually does support it correctly. |
You can compile the program yourself if you want, it's just https://github.com/univrsal/SDL/blob/main/test/testgamecontroller.c which is part of the sdl2 tests |
Tested in Linux with a PS3, PS4, and PS5 controller, seems to work fine on all. |
I can test it for Xbox and Xbox Elite controllers later today or tomorrow. |
The ps4 and ps4 controller have a touch pad, right? Did sdl2 detect any input when you used them? (There probably won't be any visualization since the display uses an xbox gamepad, but maybe the console window shows something). Also did the button with the playstation logo work?
Can you also test if the guide button and the additional buttons work? |
Sure, will do. |
All buttons (including Guide) work. And I don't have controller with Share button, so couldn't test that. |
Thanks for testing. I assume there's a way to convert the axis values if the interface shows the movements correctly. |
Yes, as you said, no visual indicator. (I had to filter out the gyro \ accelerometer lines via
Yes. It showed as the giant center button in the picture (output indicated the 'guide' button), and the microphone mute button was reflected in the button just under that (the 'misc1' button). Unrelated to the rest, since people were talking about switch controllers, I found an off-brand pro version I had in the house, and it works as expected. Y and X are swapped visually, but report correctly, the same as B and A, since Nintendo and Microsoft seem to have reversed positioning on those compared to each other. Edit: I forgot the switch controller had buttons on the back / bottom. These do not seem to report anything at all when pressed. |
Thanks for the feedback. I assume that the movement is limited to values between 0 and 1. So I guess input overlay could visualize and forward that via the websocket server. The swapped X/Y are a bit annoying, but the preset for the switch can just switch (hah) them, alternatively it seems like there is an option to change this in sdl
Are those extra buttons also on a normal switch pro controller? If not it's probably an issue with SDL assuming that it is a switch pro controller |
Correct. Touchpad values on the PS5 touchpad seem to be 0.00 through 1.00 on the X and Y axis, with a Z value that seems to always be '1.00' when the touchpad's being touched, and '0.00' as the very last value as the touch pad is released. (You can see that in my output above.) No indication that I can see that the Z value is ever anything other than a binary value besides it being shown as having a decimal point. Also, while it only lists 'finger 0' above, it looks like the touchpad can register two fingers (0 and 1) at the same time.
I don't see anything that looks similar on the pictures of a real switch pro controller, so I guess not. I have no idea what they're for, but since it's an off-brand and doesn't exist on the official pro controller and they're not registering in SDL, I doubt it's worth caring about. |
The code references the third value as |
Those buttons probably have to be assigned to mimick another face or shoulder button, which is non-standard for the base model of controlers for microsoft, sony, and nintendo, so no need to worry. I would assume that if theyre assigned, SDL2 would show the mimicked button being activated and not those back buttons, but not something I think would be a deal breaker for people. |
Indeed it is working, Y is Y and X is X. |
I'm glad that you know the reason for this, because I honestly thought it was just some weird quirk of my system and didn't want to mention it. When you say "debug builds," how are you building it differently? (as in, is there a way for me to modify it so I can build a debug build, and maybe I can help figure out the issue this way) |
Just the normal cmake debug target, i.e. You can also do what I did for the CI builds and tamper with the headers that cause the issue, but I wouldn't recommend that: |
Yeah, I wouldn't want to actually mess with library headers; that sounds like a lost cause. I will try and see what's different in the debug build, though; my guess is that there might be some extra include flags that conflict, but we'll see. Not sure if I'll get to this over the weekend or not, but I'll share what I find if I find anything. |
On Arch, makepkg will default to x86-64 arch which result in the wall of errors with intrinsics. Adding -msse4.1 work around the problem. |
Where did you add that? |
It's a compile flag for GCC. For makepkg, you'd have to add it into |
So I guess |
I see what's going on: OBS is defining things that are defined in standard intrinsincs headers because they aren't included yet and compiler flags indicate that they aren't available. And then SDL include the file |
I figured it out. Since the scroll wheel and right mouse button are switched on linux I switched keycodes 2 and 3. That should only happen for mouse button elements, but I did it for all elements so the gamepad codes 2 and 3 where also switched. Should be fixed with 4cb687f |
You shouldn't force it in your source. For a packager, it would cause issues as binaries packages are expected to target an architecture which isn't always to one of the machine compiling. Ideally it should have the widest compatibility by default. Also it won't work for msvc. |
Well windows never had the issue to begin with. I'll just leave it the way it is for now. |
Went from dpad not working to everything not working now. New issue? |
nah just post the full log here, ideally while running obs with |
Try the a6d212f commit. Ideally with only one gamepad connected first. I already heard that multiple seem to cause issues. |
I only have one connected, not sure why it's detecting two. jstest only shows one. |
Might be that it first thinks it's an xbox 360 gamepad and then identifies it as an xbox one gamepad. I'll try and see if I can find another gamepad so I can reproduce the bug |
I don't know if my issue is in anyway related to this. I'm using a GuliKit gamepad over Bluetooth. It's recognized as an XBox One controller but the only inputs that are shown are the left trigger and right trigger. None of the others light up or move. Is there anything I can provide you in terms of logs? Should I create another issue for this? Edit: Maybe as a side-note: With your SDL2 implementation, everything is recognised as it should be. |
DS4 controllers doesn't seem to have full recognition by the overlay. Only ones that work are the d-pad, the joysticks, and the triggers. The rest don't show, even when clicked. |
Just came from #302 , finally got around to trying this. Not sure if you are still accepting gamepad related issue threads so I'll drop something here and let me know if I should continue it in a thread. Checked that this detects my controller inputs, and it does. Then I saw there was an update to input-overlay so I updated. Did some looking around, and my config file had the old codes for controller inputs. That's where I am now. It crashes if input something with the controller after the controller is disconnected then reconnected. OBS 29.0.2. input-overlay 5.0.3 |
provide the crash log and the full obs studio log |
Can you download the plugin build at the bottom of this page, install it and see if it fixes the crash? |
That would be under "Artifacts" --- input-overlay-windows-x64-85da14516 If so, that does fix the crashes but now it doesn't detect the controller inputs most of the time. |
I had an older version of this that worked great (possibly pre-5.0) but I wiped the OBS and had to redownload - now it's super busted. I tried the latest release, as well as the most recent Actions build, but I only see my sticks and triggers working (no buttons will light up) |
i just got V5.0.5 and i don't see any inputs from my Gulikit KK3 |
I can also confirm my pro controller does not work with the default preset (switch or default gamepad). When I first added the input overlay source, my joysticks seemed to be in non default positions. Restarting OBS put them back in the center, but still no input is being shown on the overlay. The controller test program (sdl2.gamepadtest.zip) seems to read the inputs fine 18/6/24 - Update |
I've just finished some tests with SDL2, and it seems like I could replace the gamepad library with it. Before I do that, it would be good to have some people test SDL2 with their game pads to see if the mappings are working. SDL2 is used in a lot of games so I assume there shouldn't be any issues. I've attached the SDL2 gamepad test.
sdl2.gamepadtest.zip
Holding shift will show the back of the controller with additional buttons.
I'll also close all gamepad related issues and we'll just use this issue to collect information regarding gamepads.
SDL2 tests so far
Previous gamepad issues:
#294
#286, #253
Should be fixed when using SDL2
#260
Should work with SDL2, if not I won't spend any additional time on this for now
#208
Apparently a crash with the gamepad library, should be fixed when using SDL2.
#195, #191
Mapping/ D-Pad issue should be fixed with SDL2
#183
SDL2 should support xbox one gamepads just fine
#175
More mapping issues once again SDL2 should handle them correctly
#241
Another dpad issue
#116
General issue with gamepad being detected
#213
Razer Rajiu not being detected, apparently that is a controller, so sdl will most likely handle it just fine.
#196 DirectInput implementation seemed to have caused stalls (probably waiting for a mutex)
Semi related issues:
#285 The incorrect position of the analog sticks is an issue with the library using different value ranges for linux and windows
#199 The binding tab will be removed as sdl2 should take care of correct bindings
The text was updated successfully, but these errors were encountered: