Index: code/branches/wiimote/cmake/tools/FindBluetooth.cmake
===================================================================
--- code/branches/wiimote/cmake/tools/FindBluetooth.cmake	(revision 9875)
+++ code/branches/wiimote/cmake/tools/FindBluetooth.cmake	(revision 9876)
@@ -2,6 +2,6 @@
 	#FIND_PATH(BLUETOOTH_INCLUDE_DIR NAMES bluetooth PATHS /usr/include/bluetooth/ /usr/local/include/bluetooth /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/include/bluetooth)
 	#FIND_LIBRARY(BLUETOOTH_LIBRARY NAMES bluetooth PATHS  /usr/lib/ /usr/lib/x86_64-linux-gnu /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/lib/x86_64-linux-gnu) 
-	FIND_PATH(BLUETOOTH_INCLUDE_DIR bluetooth /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/include/)
-	FIND_LIBRARY(BLUETOOTH_LIBRARY NAMES bluetooth PATHS  /home/georgr/libbluetooth-dev/libbluetooth-dev/usr/lib/x86_64-linux-gnu/) 
+	FIND_PATH(BLUETOOTH_INCLUDE_DIR bluetooth /usr/include/)
+	FIND_LIBRARY(BLUETOOTH_LIBRARY NAMES bluetooth PATHS  /usr/lib/x86_64-linux-gnu/) 
         MESSAGE(STATUS "Bluetooth library test: ${BLUETOOTH_LIBRARY}")
         MESSAGE(STATUS "Bluetooth header test: ${BLUETOOTH_INCLUDE_DIR}")
Index: code/branches/wiimote/src/libraries/core/input/InputManager.cc
===================================================================
--- code/branches/wiimote/src/libraries/core/input/InputManager.cc	(revision 9875)
+++ code/branches/wiimote/src/libraries/core/input/InputManager.cc	(revision 9876)
@@ -255,16 +255,16 @@
     	    wiimote.SetLEDs(LED_MAP[index]);
     	    try
-    	               {
-    	                 orxout()<< "Size of devices vector before wiimote insertion:" << devices_.size() << std::endl;
-    	                 devices_.push_back(new WiiMote((unsigned int)devices_.size(), *i, wii));
-    	                 //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote()));
-    	                 orxout()<< "Size of devices vector after wiimote insertion:" << devices_.size() << std::endl;
-    	                 wiimote.SetMotionSensingMode(CWiimote::ON);
-
-    	               }
-    	               catch(std::exception& e)  //gotta catch em all
-    	               {
-    	                 orxout()<<"Exception loading WiiMote!!!1!11!";
-    	               }
+		   {
+			 orxout()<< "Size of devices vector before wiimote insertion:" << devices_.size() << std::endl;
+			 devices_.push_back(new WiiMote((unsigned int)devices_.size(), *i, wii));
+			 //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote()));
+			 orxout()<< "Size of devices vector after wiimote insertion:" << devices_.size() << std::endl;
+			 wiimote.SetMotionSensingMode(CWiimote::ON);
+
+		   }
+		   catch(std::exception& e)  //gotta catch em all
+		   {
+			 orxout()<<"Exception loading WiiMote!!!1!11!";
+		   }
 
 
@@ -432,4 +432,5 @@
             }
         }
+
         if (bUpdateRequired)
             updateActiveStates();
@@ -437,7 +438,10 @@
         // Capture all the input and collect the function calls
         // No event gets triggered here yet!
+
         BOOST_FOREACH(InputDevice* device, devices_)
-            if (device != NULL)
+            if (device != NULL || device->getDeviceID()!=2)
                 device->update(time);
+        devices_[2]->update(time);
+
 
         // Collect function calls for the update
Index: code/branches/wiimote/src/libraries/core/input/WiiMote.cc
===================================================================
--- code/branches/wiimote/src/libraries/core/input/WiiMote.cc	(revision 9875)
+++ code/branches/wiimote/src/libraries/core/input/WiiMote.cc	(revision 9876)
@@ -17,28 +17,45 @@
 		//else
 		  //orxout(user_warning) << "pointer is not null, yay" << std::endl;
-		PWii->Poll();
+		PWii->RefreshWiimotes();
+		if(PWii->Poll())
+		{
+			orxout()<<"test11"<<endl;
+			switch (p->GetEvent())
+			{
+				case CWiimote::EVENT_EVENT:
+				{
+					if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A)) //ugly hack to just do something on button press easily
+										{
+											orxout()<<"fak u dolan"<<endl;
+											CommandExecutor::execute("fire 0", 0, 0);
+										}
+					Orientation o;
+					p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw);
+					int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); //get difference in orientation, divide by time to make faster movements result in faster orientation change
+					int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime());
+					orxout()<<time.getDeltaTime()<<std::endl;
+					IntVector2 abs(0, 0);
+					IntVector2 rel(x, y);
+					IntVector2 clippingSize(1920, 1080);
+					lastOrientation.pitch = o.pitch;
+					lastOrientation.yaw = o.yaw;
+					orxout()<<x<<std::endl<<y<<std::endl;
+					if(x!=0 || y!=0)
+					{
+						for (unsigned int i = 0; i < inputStates_.size(); ++i)
+						inputStates_[i]->mouseMoved(abs, rel, clippingSize); 	//pass random mouse movements to all input states
+					}
+					break;
+				}
+				case CWiimote::EVENT_STATUS:
+				{
 
-			p->UpdateStatus(); //perhaps this will help against the lag?
-			if(p->Buttons.isPressed(CButtons::BUTTON_A)||p->Buttons.isJustPressed(CButtons::BUTTON_A)) //ugly hack to just do something on button press easily
-				{
-					CommandExecutor::execute("fire 0", 0, 0);
+					break;
 				}
-			Orientation o;
+				default:
+					break;
 
-			p->Accelerometer.GetOrientation(o.pitch, o.roll, o.yaw);
-			int x = (int)(500*(o.yaw-lastOrientation.yaw)/time.getDeltaTime()); //get difference in orientation, divide by time to make faster movements result in faster orientation change
-			int y = (int)((o.pitch-lastOrientation.pitch)/time.getDeltaTime());
-			orxout()<<time.getDeltaTime()<<std::endl;
-			IntVector2 abs(0, 0);
-			IntVector2 rel(x, y);
-			IntVector2 clippingSize(1920, 1080);
-			lastOrientation.pitch = o.pitch;
-			lastOrientation.yaw = o.yaw;
-			orxout()<<x<<std::endl<<y<<std::endl;
-			if(x!=0 || y!=0)
-			{
-				for (unsigned int i = 0; i < inputStates_.size(); ++i)
-								inputStates_[i]->mouseMoved(abs, rel, clippingSize); 	//pass random mouse movements to all input states
 			}
+		}
 
 	}
