Beispiel #1
0
int main()
{
  try
  {
    SDLSystem sdl_system;

    Input::Manager manager;

    Input::ControllerPtr controller
      = manager.create_controller(Pathname("../data/controller/default.scm", Pathname::SYSTEM_PATH));

    while(true)
    {
      std::vector<Input::Event> events;

      controller->poll_events(events);

      for(std::vector<Input::Event>::iterator i = events.begin(); i != events.end(); ++i)
      {
        // insert code here
      }

      manager.update(0.033f);
    }
  }
  catch (std::exception& err)
  {
    std::cout << "Exception: " << err.what() << std::endl;
  }

  return 0;
}
Beispiel #2
0
 inline void updateInput(Input::InputState& mInputState, FT mFT)
 {
     inputManager.update(mInputState, mFT);
 }