Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5237 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
Sep 24, 2005, 10:41:52 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: implemented an EventFilter, that should filter alt-TAB

Location:
trunk/src/lib
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/event/event_handler.cc

    r5236 r5237  
    3636  SDL_InitSubSystem(SDL_INIT_JOYSTICK);
    3737  SDL_InitSubSystem(SDL_INIT_EVENTTHREAD);
     38//  SDL_SetEventFilter(EventHandler::eventFilter);
    3839
    3940  this->setClassID(CL_EVENT_HANDLER, "EventHandler");
     
    294295}
    295296
    296 
     297int EventHandler::eventFilter(const SDL_Event *event)
     298{
     299  /*
     300  if (event->type == SDL_KEYDOWN &&  event->key.keysym.sym == SDLK_TAB && SDL_GetKeyState(NULL)[SDLK_LALT])
     301  {
     302    printf("test\n");
     303
     304  }
     305  return 1;
     306  */
     307}
     308
     309/**
     310 * outputs some nice information about the EventHandler
     311 */
    297312void EventHandler::debug() const
    298313{
  • trunk/src/lib/event/event_handler.h

    r5210 r5237  
    3838  void process();
    3939
     40  static int eventFilter(const SDL_Event *event);
    4041  void debug() const;
    4142
     
    5253};
    5354
     55
    5456#endif /* _EVENT_HANDLER_H */
  • trunk/src/lib/graphics/graphics_engine.cc

    r5225 r5237  
    214214  this->bitsPerPixel = bpp;
    215215
     216  if (this->screen)
     217    SDL_FreeSurface(screen);
    216218  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | this->fullscreenFlag)) == NULL)
    217219    {
  • trunk/src/lib/shell/shell_input.cc

    r5207 r5237  
    3636    ->describe("retrieve some help about the input mode")
    3737    ->setAlias("help");
     38
    3839/**
    3940 * standard constructor
Note: See TracChangeset for help on using the changeset viewer.