Open ShygalCoco opened 1 year ago
The generic gamepad not working is because joystick_force_disabled
defaults to 1 probably because CS:GO isn't designed for controllers. If you turn that off (actually I think you want joystick_force_disabled_set_from_options 0
so it saves in configs properly) and copy over the joy_preset_x.cfg
files from P2 so it binds the buttons properly, buttons seem to work but sticks still don't.
I'm not really sure what's the best way to handle controller support, the obvious option would be to just use Steam Input for everything, but that comes with an annoying limitation for a project like P2CE - input actions have to be predefined in Steamworks, they can't be dynamically added by workshop items (which would be possible with keyboard input and legacy controller input). So we'd need to implement some sort of system to have like generic "workshop binding 1", "workshop binding 2" and so on which you can set in Steam Input, then allow you to choose what actual actions those correspond to in-game, or otherwise come up with some sort of solution to this.
...or we could dynamically write Steam/controller_config/game_actions_440000.vdf
to change the available input actions, which seems really prone to breaking and is probably a terrible idea, but I had to at least mention it.
Describe the bug
If I already made a similar issue before this, delete the previous one as this should be more informative.
The official controller config made for P2:CE for all available branches is underdone, lacking certain actions like crouching and some actions don't work like pausing the game while playing. Ideally, all necessary actions possible should be possible from the official controller config and those actions should work as expected.
There's also a lack of support for the generic gamepad config, as in the basic input given from Valve's official Xbox 360 gamepad template. P2:CE still recognizes that a controller is connected when using the Xbox 360 gamepad template, fitting button prompts appearing in the menu UI and such. However, no buttons work whatsoever in the menu UI or in-game.
Also, trying to turn on controller vibration in the controller options submenu doesn't work as it reverts back to disabled when leaving the submenu.
Issue Map
Any.
To Reproduce
Mess around in the menu UI and in-game using the official controller config made for P2:CE and Valve's official Xbox 360 gamepad template.
Operating System
Windows 10