pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r3067 - trunk/pingus/src/input


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3067 - trunk/pingus/src/input
Date: Sun, 2 Sep 2007 19:31:00 +0200

Author: grumbel
Date: 2007-09-02 19:31:00 +0200 (Sun, 02 Sep 2007)
New Revision: 3067

Modified:
   trunk/pingus/src/input/usbmouse_driver.cpp
Log:
- only display events when --debug input is set

Modified: trunk/pingus/src/input/usbmouse_driver.cpp
===================================================================
--- trunk/pingus/src/input/usbmouse_driver.cpp  2007-09-02 17:20:57 UTC (rev 
3066)
+++ trunk/pingus/src/input/usbmouse_driver.cpp  2007-09-02 17:31:00 UTC (rev 
3067)
@@ -30,6 +30,8 @@
 #include <iostream>
 #include <errno.h>
 
+#include "debug.hpp"
+#include "globals.hpp"
 #include "math/vector2i.hpp"
 #include "usbmouse_driver.hpp"
 
@@ -140,7 +142,11 @@
               {
                 --delta_z;
 
-                std::cout << "Wheel Down" << std::endl;
+                // Wheel Down
+                pout(PINGUS_DEBUG_INPUT) << "USBMouseDriver: "
+                                         << "(usbmouse:button (device \"" << 
device << "\") "
+                                         << "(button " << 5 << ")) ;; wheel 
down" << std::endl;
+
                 for(std::vector<Button*>::iterator j = 
button_bindings[5].begin();
                     j != button_bindings[5].end(); ++j)
                   {
@@ -156,7 +162,11 @@
               {
                 ++delta_z;
 
-                std::cout << "Wheel Up" << std::endl;
+                // Wheel Down
+                pout(PINGUS_DEBUG_INPUT) << "USBMouseDriver: "
+                                         << "(usbmouse:button (device \"" << 
device << "\") "
+                                         << "(button " << 6 << ")) ;; wheel 
up" << std::endl;
+
                 for(std::vector<Button*>::iterator j = 
button_bindings[6].begin();
                     j != button_bindings[6].end(); ++j)
                   {
@@ -179,7 +189,9 @@
           {
             if (new_state[i] != buttons[i])
               {
-                std::cout << "Button: " << i << std::endl;
+                pout(PINGUS_DEBUG_INPUT) << "USBMouseDriver: "
+                                         << "(usbmouse:button (device \"" << 
device << "\") "
+                                         << "(button " << i << "))" << 
std::endl;
 
                 buttons[i] = new_state[i];
 





reply via email to

[Prev in Thread] Current Thread [Next in Thread]