Changeset 9805
- Timestamp:
- Nov 24, 2013, 11:15:46 AM (11 years ago)
- Location:
- code/branches/wiimote/src/libraries/core/input
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/wiimote/src/libraries/core/input/InputManager.cc
r9790 r9805 254 254 255 255 } 256 try 257 { 258 orxout()<<devices_.size(); 259 devices_.push_back(new WiiMote(devices_.size(), *(new CWiimote()))); 260 //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote())); 261 262 } 263 catch(std::exception& e) //gotta catch em all 264 { 265 orxout()<<"Exception loading WiiMote!!!1!11!"; 266 } 256 try 257 { 258 orxout()<< "Size of devices vector before wiimote insertion:" << devices_.size() << std::endl; 259 devices_.push_back(new WiiMote(devices_.size(), *(new CWiimote()))); 260 //devices_[2] = new WiiMote(devices_.size(), *(new CWiimote())); 261 orxout()<< "Size of devices vector after wiimote insertion:" << devices_.size() << std::endl; 262 263 } 264 catch(std::exception& e) //gotta catch em all 265 { 266 orxout()<<"Exception loading WiiMote!!!1!11!"; 267 } 267 268 268 269 } … … 475 476 if (rit->second->isInputDeviceEnabled(i) && (!occupied || rit->second->bAlwaysGetsInput_)) 476 477 { 477 478 orxout() << "Success with ID " << i <<std::endl; 478 479 states.push_back(rit->second); 479 480 if (!rit->second->bTransparent_) -
code/branches/wiimote/src/libraries/core/input/InputState.cc
r9790 r9805 49 49 priority_ = 0; 50 50 51 handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL); 51 // SANDRO HACK: make this 1 larger so we can have the wiimote read out as well 52 //handlers_.resize(InputDeviceEnumerator::FirstJoyStick + this->getJoyStickList().size(), NULL); 53 handlers_.resize(InputDeviceEnumerator::FirstJoyStick 54 + 1 + this->getJoyStickList().size(), NULL); 52 55 } 53 56 … … 98 101 setMouseHandler(handler); 99 102 setJoyStickHandler(handler); 103 setWiiMoteHandler(handler); // SANDRO HACK 100 104 } 101 105 -
code/branches/wiimote/src/libraries/core/input/InputState.h
r8729 r9805 100 100 void setMouseHandler (InputHandler* handler) 101 101 { handlers_[mouseIndex_s] = handler; bExpired_ = true; } 102 103 // SANDRO HACK 104 void setWiiMoteHandler(InputHandler* handler) 105 { // TODO make this a dynamically chosen number 106 handlers_[2] = handler; bExpired_ = true; 107 } 108 102 109 /** 103 110 @brief -
code/branches/wiimote/src/libraries/core/input/WiiMote.h
r9790 r9805 31 31 void calibrationStopped() { } 32 32 //! List of all input states that receive events from this device 33 33 //std::vector<InputState*> inputStates_; 34 34 35 35 private: -
code/branches/wiimote/src/libraries/core/input/Wiimote_Test.cc
r9706 r9805 6 6 */ 7 7 8 #include " /usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/core/input/Wiimote_Test.h"8 #include "Wiimote_Test.h" 9 9 #include "core/CoreIncludes.h" 10 10 #include "core/command/ConsoleCommand.h" 11 11 #include "InputState.h" 12 #include </usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/orxonox/OrxonoxPrereqs.h>13 12 #include "InputManager.h" 14 #include < /usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/util/UtilPrereqs.h>15 #include < /usr/tardis/home-itet-ab/georgr-extra-0/orxonox/wiimote/src/libraries/util/ScopedSingletonManager.h>13 #include <util/UtilPrereqs.h> 14 #include <util/ScopedSingletonManager.h> 16 15 17 16
Note: See TracChangeset
for help on using the changeset viewer.