Skip to content

Conversation

@f8ith
Copy link

@f8ith f8ith commented Jun 3, 2025

Very WIP PR, currently handles most of the major controller types. Tested to work on Elden Ring Nightreign with a stock Dualsense.

Implements

  • Querying controller types and connected controllers
  • Rumble
  • Action set layers
  • GetActionOrigins, GetGlyphForActionOrigin, GetActionOriginFromXboxOrigin....

Note on XInput Emulation

Real steam emulates Xinput for non-Xinput gamepads on windows. We could attempt to do the same by hooking Xinput same way that Steam does, but it's tricky and would only work well on experimental builds most likely

TODO

  • Fix reconnecting controllers
  • Implement action layers -> fixes gamepad detection
  • Loading action set layers
  • Test rumble
  • Customizable deadzone, layers, etc.

- steam_input emulation with sdl3 instead of gamepad.c
- implemented ActionSetLayers
- added configurable deadzone under main::gamepad
@f8ith
Copy link
Author

f8ith commented Jun 8, 2025

Not sure why protoc is failing on github actions but builds fine locally

@universal963
Copy link
Collaborator

Not sure why protoc is failing on github actions but builds fine locally

The deps cache in Github Actions has now been regenerated, and PR #249 builds successfully.

@item520
Copy link

item520 commented Jul 11, 2025

I hope to achieve the controller effect of RUNE. RUNE can customize the controller type, but some require Steam input, which still doesn't work. For example, although the PS5 controller can be played with, it still simulates XBinput because the touchpad doesn't support it, and linear triggers don't support many games. I have tested that the touchpad of the PS5 controller is invalid, but it can recognize it, but everything works normally with GLR

@ilcheese2
Copy link

Is this still being worked on? I was trying to build for Mac but I'd have to port the gamepad library.

@item520
Copy link

item520 commented Jan 17, 2026

这还在进行中吗?我本来想为Mac开发,但得把手柄库移植。

I think it would be great if we could finally handle the selection of controller characters. For the rest, we could convert to SDL, so that we can set up our own controller mode patterns that developers don't have options for in the game

@f8ith
Copy link
Author

f8ith commented Jan 21, 2026

Is this still being worked on? I was trying to build for Mac but I'd have to port the gamepad library.

in terms of emulating the basic steam input api itself, the code should be relatively complete though a little messy but rumble + multiple controller still hasn't been tested because I do not have access to those things/a game with rumble myself right now.

What do you mean by porting the gamepad library? sdl3 should be crossplatform though you may need to edit the build script

@ilcheese2
Copy link

I was talking about the library that is currently used. I ended up implementing the functions with Apple's Game Controller Framework, and it built, but I haven't verified whether it works.

@f8ith
Copy link
Author

f8ith commented Jan 21, 2026

This PR should remove the need for libgamepad. With SDL iirc there shouldn't be any relevant code that references libgamepad anymore.

@utkarshdalal
Copy link

utkarshdalal commented Jan 23, 2026

Curious about this one, would it fix issues where games aren't detecting the gamepad? I just opened an issue for this for No Man's Sky. If it's complete and we're only waiting to see if rumble works, I could request someone to test for you, or we could put the new implementation behind a flag like sdl3_input=1 (0 by default, legacy input)

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.

5 participants