Post ASLZ0qvrxoh7TkLv9M by rubenwardy@fosstodon.org
(DIR) More posts by rubenwardy@fosstodon.org
(DIR) Post #ASLZ0pEaHGTaDD5q2i by rubenwardy@fosstodon.org
2023-01-24T23:15:21Z
0 likes, 0 repeats
New blog post: SDL_GameController: Making gamepads just work#SDL2 #gamedevhttps://blog.rubenwardy.com/2023/01/24/using_sdl_gamecontroller/
(DIR) Post #ASLZ0ptLph5OFeAOaO by a1ba@suya.place
2023-02-04T20:22:50.430558Z
0 likes, 0 repeats
@rubenwardy SDL_GameController is still too rough.The built-in database doesn't have a wide range of all gamepads. If you set up your controller in Steam, but the game is run outside of it, it just won't work.I personally found out that supporting both SDL_GameController and SDL_Joystick can be a solution, if GameController refuses to work normally.
(DIR) Post #ASLZ0qvrxoh7TkLv9M by rubenwardy@fosstodon.org
2023-01-25T10:15:40Z
0 likes, 1 repeats
#minetest
(DIR) Post #ASLZimuII7zHjgZ7sf by rubenwardy@fosstodon.org
2023-02-04T20:24:06Z
0 likes, 0 repeats
@a1ba You can extend the support of SDL_GameController without modifying the program, this is how Steam allows you to set up your controller. There's an environment variable for it and a fileHere's a GUI tool I found from a quick google: https://generalarcade.com/gamepadtool/
(DIR) Post #ASLZinMIc0OB8XfUX2 by a1ba@suya.place
2023-02-04T20:30:48.340173Z
0 likes, 0 repeats
@rubenwardy it's great, but I'm not going to download separate tool to set up a gamepad and configure it, when it's easier to pass documented command line flag and my engine will switch to SDL_Joystick which usually works perfectly.To me, it's a big issue when there is no steam and no entry in builtin database makes GameController stop working. The user then must know about which gamepad configure tool they must use, how to pass environment variable, and hope that it will just work.
(DIR) Post #ASLaMyup3z74YxyjgG by rubenwardy@fosstodon.org
2023-02-04T20:32:26Z
0 likes, 0 repeats
@a1baBut then it won't work with SDL_Joystick either, as you don't know the mapping. So in any case, the player needs to be able to manually bind their controller - SDL_GameController already allows this, without needing to implement it yourself
(DIR) Post #ASLaMzVKsEJuOD3taq by a1ba@suya.place
2023-02-04T20:38:04.047929Z
0 likes, 0 repeats
@rubenwardy it's great when it works.I know, falling back to plain SDL_Joystick is a temporary solution and user be better to generate a configuration line. But bugreports tell me that GameController can just refuse to work, and the whole UX process of configuring it outside a game just sucks.
(DIR) Post #ASLaY9GMvpWRqBNiL2 by a1ba@suya.place
2023-02-04T20:39:35.964731Z
0 likes, 0 repeats
@rubenwardy by the way, I better revisit my own gamepad support implementation. I haven't touched it since 2017-2018.