Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 928


Ignore:
Timestamp:
Mar 26, 2008, 8:18:14 PM (16 years ago)
Author:
rgrieder
Message:
  • added destroy code for the InputHandler
Location:
code/branches/network/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/InputHandler.cc

    r922 r928  
    8080      windowHndStr << (unsigned int)windowHnd;
    8181      paramList.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
     82
     83#if defined OIS_LINUX_PLATFORM
     84      paramList.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
     85#endif
    8286
    8387      // Create inputsystem
     
    109113    //assign 'abort' to the escape key
    110114    this->bindingsKeyPressed_[(int)OIS::KC_ESCAPE].id = 1;
     115  }
     116
     117  /**
     118    @brief Destroys all the created input devices.
     119  */
     120  void InputHandler::destroy()
     121  {
     122    this->inputSystem_->destroyInputObject(this->mouse_);
     123    this->inputSystem_->destroyInputObject(this->keyboard_);
     124    OIS::InputManager::destroyInputSystem(this->inputSystem_);
     125
     126    //TODO: If the InputHandler has been destroyed, how does it know?
    111127  }
    112128
  • code/branches/network/src/orxonox/InputHandler.h

    r922 r928  
    4949  public:
    5050    void initialise(size_t windowHnd, int windowWidth, int windowHeight);
     51    void destroy();
    5152    void tick(float dt);
    5253    void setWindowExtents(int width, int height);
  • code/branches/network/src/orxonox/Orxonox.cc

    r926 r928  
    9898  {
    9999    // nothing to delete as for now
     100    inputHandler_->destroy();
    100101  }
    101102
Note: See TracChangeset for help on using the changeset viewer.