Changeset 922 for code/branches/network/src/orxonox/Orxonox.cc
- Timestamp:
- Mar 25, 2008, 5:04:26 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network/src/orxonox/Orxonox.cc
r919 r922 37 37 #include <OgreException.h> 38 38 #include <OgreRoot.h> 39 #include <OgreFrameListener.h>40 39 #include <OgreRenderWindow.h> 41 40 #include <OgreTextureManager.h> … … 373 372 } 374 373 375 374 /** 375 @brief Calls the InputHandler which sets up the input devices. 376 The render window width and height are used to set up the mouse movement. 377 */ 376 378 void Orxonox::setupInputSystem() 377 379 { … … 379 381 inputHandler_->initialise(ogre_->getWindowHandle(), 380 382 ogre_->getWindowWidth(), ogre_->getWindowHeight()); 381 382 /*size_t windowHnd = 0;383 std::ostringstream windowHndStr;384 OIS::ParamList pl;385 386 // fixes auto repeat problem387 #if defined OIS_LINUX_PLATFORM388 pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));389 #endif390 391 Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();392 win->getCustomAttribute("WINDOW", &windowHnd);393 windowHndStr << windowHnd;394 pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));395 inputManager_ = OIS::InputManager::createInputSystem(pl);396 397 try398 {399 keyboard_ = static_cast<OIS::Keyboard*>(inputManager_->createInputObject(OIS::OISKeyboard, false));400 mouse_ = static_cast<OIS::Mouse*>(inputManager_->createInputObject(OIS::OISMouse, true));401 }402 catch (const OIS::Exception &e)403 {404 throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem");405 }*/406 383 } 407 384 … … 512 489 return (float)(times.back() - times.front()) / ((times.size()-1) * 1000); 513 490 } 491 492 void Orxonox::eventOccured(InputEvent &evt) 493 { 494 if (evt.id == 1) 495 this->abortRequest(); 496 } 514 497 }
Note: See TracChangeset
for help on using the changeset viewer.