Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5309 in orxonox.OLD for trunk/src/lib/shell


Ignore:
Timestamp:
Oct 8, 2005, 12:47:00 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: Ckeck if an Event is already subscribed via isSubscribed, and using it in the ShellInput

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/shell/shell_input.cc

    r5306 r5309  
    5858  EventHandler* evh = EventHandler::getInstance();
    5959  for (int i = 1; i < SDLK_LAST; i++)
    60     evh->subscribe(this, ES_SHELL, i);
    61 
     60  {
     61    if (!evh->isSubscribed(ES_SHELL, i))
     62      evh->subscribe(this, ES_SHELL, i);
     63  }
    6264  this->completion = new ShellCompletion(this);
    6365}
Note: See TracChangeset for help on using the changeset viewer.