From d9e1741f84bfd9d2b03993cc282c38ca5cfb6c6e Mon Sep 17 00:00:00 2001 From: Ingo Ruhnke Date: Fri, 14 Jan 2011 13:08:04 +0100 Subject: [PATCH] Some more libusb-1.0 related cleanup --- NEWS | 6 ++++++ README | 10 +++++----- src/chatpad.cpp | 10 +++++----- src/xbox360_controller.cpp | 2 +- src/xbox_controller.cpp | 2 +- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/NEWS b/NEWS index 6a54689..43f223f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +xboxdrv 0.6.5 - (??/Jan/2011) +============================= + +* switched to libusb-1.0 + + xboxdrv 0.6.4 - (13/Jan/2011) ============================= diff --git a/README b/README index 2800b5d..8623166 100644 --- a/README +++ b/README @@ -31,7 +31,7 @@ The development version can be optained via: Required libraries and tools: * g++ - GNU C++ Compiler - * libusb + * libusb-1.0 * boost * scons * uinput (userspace input kernel module) @@ -43,14 +43,14 @@ Once everything installed, you can compile by typing: $ scons -On Ubuntu 10.04 you can install all the required libraries via: +On Ubuntu 10.10 you can install all the required libraries via: $ sudo apt-get install \ g++ \ - libboost1.40-dev \ - libboost-thread1.40-dev \ + libboost1.42-dev \ + libboost-thread1.42-dev \ scons \ - libusb-dev \ + libusb-1.0-0-dev \ git-core \ libx11-dev \ x11proto-core-dev \ diff --git a/src/chatpad.cpp b/src/chatpad.cpp index 8f216f8..697e2ad 100644 --- a/src/chatpad.cpp +++ b/src/chatpad.cpp @@ -180,6 +180,11 @@ Chatpad::set_led(unsigned int led, bool state) { send_ctrl(0x41, 0x00, 0x0000, 0x0002, NULL, 0); } + else if (led == CHATPAD_LED_BACKLIGHT) + { + // backlight goes on automatically, so we only provide a switch to disable it + send_ctrl(0x41, 0x00, 0x0004, 0x0002, NULL, 0); + } } } @@ -256,11 +261,6 @@ Chatpad::process(const ChatpadKeyMsg& msg) { if (m_state[i]) { - if (i == CHATPAD_KEY_1) - { - send_ctrl(0x41, 0x00, 0x0004, 0x0002, NULL, 0); - } - if (i == CHATPAD_MOD_PEOPLE) { set_led(CHATPAD_LED_PEOPLE, !get_led(CHATPAD_LED_PEOPLE)); diff --git a/src/xbox360_controller.cpp b/src/xbox360_controller.cpp index 65c315f..1ecf5c1 100644 --- a/src/xbox360_controller.cpp +++ b/src/xbox360_controller.cpp @@ -139,7 +139,7 @@ Xbox360Controller::find_endpoints() throw std::runtime_error("-- failure --"); // FIXME } - bool debug_print = true; + bool debug_print = false; // FIXME: no need to search all interfaces, could just check the one we acutally use for(const libusb_interface* interface = config->interface; diff --git a/src/xbox_controller.cpp b/src/xbox_controller.cpp index 483dfcb..b239c11 100644 --- a/src/xbox_controller.cpp +++ b/src/xbox_controller.cpp @@ -69,7 +69,7 @@ XboxController::find_endpoints() throw std::runtime_error("-- failure --"); // FIXME } - bool debug_print = true; + bool debug_print = false; // FIXME: no need to search all interfaces, could just check the one we acutally use for(const libusb_interface* interface = config->interface;