Skip to content
This repository has been archived by the owner on Sep 7, 2021. It is now read-only.

Add support for Xbox wireless controller #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion lib/source/gainput/pad/GainputInputDevicePadLinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ class InputDevicePadImplLinux : public InputDevicePadImpl
buttonDialect_[15] = PadButtonX;
buttonDialect_[16] = PadButtonHome;
}
else if (strcmp(name, "Microsoft X-Box 360 pad") == 0)
else if (strcmp(name, "Microsoft X-Box 360 pad") == 0 or strcmp(name, "Xbox Wireless Controller")==0)
{
#ifdef GAINPUT_DEBUG
GAINPUT_LOG(" --> known controller\n");
Expand Down Expand Up @@ -274,6 +274,13 @@ class InputDevicePadImplLinux : public InputDevicePadImpl
axisDialect_[-1] = PadButtonDown;
axisDialect_[-2] = PadButtonRight;
}
else
{
#ifdef GAINPUT_DEBUG
GAINPUT_LOG(" --> unknown controller %s\n",name);
#endif
}


deviceState_ = InputDevice::DS_OK;
}
Expand Down