Costume Quest

From Q
Jump to navigation Jump to search
File: ~/.local/share/Steam/SteamApps/common/Costume\ Quest/Data/Config/SDLGamepad.config
0000000058626f782047616d65706100,xboxdrv,a:b0,b:b1,\ y:b3,x:b2,start:b7,guide:b8,back:b6,leftstick:b9,rightstick:b10,leftshoulder:b4,rightshoulder:b5,\ dpup:h0.1,dpleft:h0.8,dpdown:h0.4,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,\ lefttrigger:a5,righttrigger:a4,

0000000058626f782047616d65706100 is the GUID of the Xbox 360 controller when used with xboxdrv. The GUID is obtained by running controllermap which is part of the SDL2 sources in the test directory.

It can be compiled via

$ x86_64-pc-linux-gnu-gcc -o controllermap controllermap.c `x86_64-pc-linux-gnu-pkg-config --libs --cflags sdl2`

and the output looks like this:

Code: ./controllermap
INFO: There are 1 joysticks attached
INFO: Joystick 0: Xbox Gamepad (userspace driver)
INFO:        axes: 6
INFO:       balls: 0
INFO:        hats: 1
INFO:     buttons: 11
INFO: instance id: 0
INFO:        guid: 0000000058626f782047616d65706100