Fixed --list-controller output

This commit is contained in:
Ingo Ruhnke 2008-05-01 11:43:11 +02:00
parent b88ef37406
commit b6a87a1eab
2 changed files with 4 additions and 2 deletions

View file

@ -43,7 +43,9 @@ Xbox360WirelessController::Xbox360WirelessController(struct usb_device* dev,
{
if (usb_claim_interface(handle, interface) != 0) // FIXME: bInterfaceNumber shouldn't be hardcoded
{
throw std::runtime_error("Xbox360WirelessController: Error couldn't claim the USB interface");
std::ostringstream str;
str << "Xbox360WirelessController: Error couldn't claim the USB interface " << interface;
throw std::runtime_error(str.str());
}
}
}

View file

@ -124,7 +124,7 @@ void list_controller()
{
if (xpad_devices[i].type == GAMEPAD_XBOX360_WIRELESS)
{
for(int wid = 0; wid < 3; ++wid)
for(int wid = 0; wid < 4; ++wid)
{
std::cout << boost::format(" %2d | %2d | 0x%04x | 0x%04x | %s (Port: %s)")
% id