From d3893d7c5ce65864aaa5df9e258a40326ba170f3 Mon Sep 17 00:00:00 2001
From: Ingo Ruhnke <grumbel@gmx.de>
Date: Fri, 28 Jan 2011 15:26:12 +0100
Subject: [PATCH] Switch off the LED when xboxdrv is shut down

---
 NEWS                   | 2 ++
 src/xboxdrv_thread.cpp | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/NEWS b/NEWS
index 05d3b59..f262d73 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ xboxdrv 0.7.1 - (??/???/2011)
 
 * compatibility with older libudev versions
 * fixed some missing #include directives
+* new match rule usbserial=SERIAL
+* fixed LED not getting switched off on shutdown
 
 
 xboxdrv 0.7.0 - (28/Jan/2011)
diff --git a/src/xboxdrv_thread.cpp b/src/xboxdrv_thread.cpp
index e71c29f..27f6f06 100644
--- a/src/xboxdrv_thread.cpp
+++ b/src/xboxdrv_thread.cpp
@@ -159,6 +159,9 @@ XboxdrvThread::controller_loop(const Options& opts)
         
       watch_chid_process();
     }
+
+    // set LED back to black
+    m_controller->set_led(0);
   }
   catch(const std::exception& err)
   {