]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commit
Use SDL_GameController instead of SDL_Joystick where possible
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 May 2020 20:53:49 +0000 (20:53 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 17 May 2020 20:53:49 +0000 (20:53 +0000)
commit94f6390e1e8066e0a63cf4430b7b28a46a89d545
tree532037136f6101238997c2576bf4b0c137b7f4ab
parent0ec51413567a78f109ecee254e6973a42c8a026c
Use SDL_GameController instead of SDL_Joystick where possible

SDL_GameController provides mappings between axis and button indices and a
general layout that is similar to a XBox 360 controller. Since this layout is
common, these changes allow creating proper controller mappings for a large
variety of gamepad/OS combinations out of the box.

Change initially provided by EACFreddy. Fixed multiple crashes due to a stale
pointer. Also made a Con_Printf a DPrintf and removed ifdefs for SDL2 since
master doesn't support SDL1 anymore.

There's a strange stick drift problem. It might be my controller but
it'll have to be investigated further.

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12530 d7cf8633-e32d-0410-b094-e92efae38249
vid_sdl.c