Added documentation for axis and button remapping
This commit is contained in:
parent
9fd3504db9
commit
44688f9ac6
3 changed files with 32 additions and 3 deletions
2
NEWS
2
NEWS
|
@ -1,6 +1,8 @@
|
|||
xboxdrv 0.2 - (??/May/2008)
|
||||
===========================
|
||||
|
||||
* added option to remap the axes
|
||||
* added option to remap the buttons
|
||||
* added option to specify the USB path to use, instead of using
|
||||
automatic detection
|
||||
* added option to enforce the controller type
|
||||
|
|
28
README
28
README
|
@ -89,6 +89,34 @@ your Xbox360 controller from blinking:
|
|||
For rumble to work make sure you have connected the controller to a
|
||||
USB port that has enough power, i.e. an unpowered USB hub might not
|
||||
work.
|
||||
|
||||
[[Button Remapping]]
|
||||
|
||||
Button remapping is available via the --buttonmap option. If you want
|
||||
to swap button A and B start with:
|
||||
|
||||
% ./xboxdrv --buttonmap A=B,B=A
|
||||
|
||||
If you want all face buttons send out A button events:
|
||||
|
||||
% ./xboxdrv --buttonmap B=A,X=A,Y=A
|
||||
|
||||
Possible button names are: start, guide, back, a, b, x, y, black,
|
||||
white, lb, rb, lt, rt, tl, tr, du, dd, dl, dr
|
||||
|
||||
[[Axis Remapping]]
|
||||
|
||||
Axis remapping is available via --axismap and works the same as button
|
||||
mapping. In addition you can supply a sign to indicate that an axis
|
||||
should be inverted. So if you want to invert the y1 axis start with:
|
||||
|
||||
% ./xboxdrv --buttonmap -Y1=Y1
|
||||
|
||||
If you want to swap the left and right stick start with:
|
||||
|
||||
% ./xboxdrv --buttonmap X2=X1,Y2=Y1,X1=X2,Y1=Y2
|
||||
|
||||
Possible axis names are: x1,y1,x2,y2,lt,rt
|
||||
|
||||
|
||||
[[ SDL Notes ]]
|
||||
|
|
|
@ -87,7 +87,7 @@ XPadDevice xpad_devices[] = {
|
|||
const int xpad_devices_count = sizeof(xpad_devices)/sizeof(XPadDevice);
|
||||
|
||||
XboxButton string2btn(const std::string& str_);
|
||||
XboxAxis string2axis(const std::string& str_);
|
||||
XboxAxis string2axis(const std::string& str_);
|
||||
|
||||
std::ostream& operator<<(std::ostream& out, const GamepadType& type)
|
||||
{
|
||||
|
@ -490,7 +490,6 @@ void apply_axis_map(XboxGenericMsg& msg, std::vector<AxisMapping>& lst)
|
|||
|
||||
ButtonMapping string2buttonmapping(const std::string& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
for(std::string::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||
{
|
||||
if (*i == '=')
|
||||
|
@ -533,7 +532,6 @@ void string2buttonmap(const std::string& str, std::vector<ButtonMapping>& lst)
|
|||
|
||||
AxisMapping string2axismapping(const std::string& str)
|
||||
{
|
||||
std::cout << str << std::endl;
|
||||
for(std::string::const_iterator i = str.begin(); i != str.end(); ++i)
|
||||
{
|
||||
if (*i == '=')
|
||||
|
@ -1215,6 +1213,7 @@ void print_info(struct usb_device* dev,
|
|||
std::cout << std::endl;
|
||||
}
|
||||
|
||||
std::cout << "AxisMap: ";
|
||||
if (opts.axis_map.empty())
|
||||
{
|
||||
std::cout << "none" << std::endl;
|
||||
|
|
Loading…
Reference in a new issue