Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5786 in orxonox.OLD for trunk/src/lib/event/event_handler.cc


Ignore:
Timestamp:
Nov 26, 2005, 9:56:11 PM (18 years ago)
Author:
bensch
Message:

orxonox/trunk: key-repeat in the Shell is smoother now

File:
1 edited

Legend:

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

    r5553 r5786  
    4646  /* now initialize them all to zero */
    4747  this->flush(ES_ALL);
     48  this->withUNICODE(false);
    4849
    4950  this->state = ES_GAME;
    5051  this->keyMapper = NULL;
    5152  this->stateStack = NULL;
     53
    5254}
    5355
     
    247249
    248250
     251void EventHandler::withUNICODE(bool enableUNICODE)
     252{
     253  SDL_EnableUNICODE(enableUNICODE);
     254  this->bUNICODE = enableUNICODE;
     255}
     256
     257
    249258/**
    250259 *  core function of event handler: receives all events from SDL
     
    264273          ev.bPressed = true;
    265274          ev.type = event.key.keysym.sym;
     275          if (unlikely(this->bUNICODE))
     276              ev.x = event.key.keysym.unicode;
    266277          break;
    267278        case SDL_KEYUP:
    268279          ev.bPressed = false;
    269280          ev.type = event.key.keysym.sym;
     281          if (unlikely(this->bUNICODE))
     282            ev.x = event.key.keysym.unicode;
    270283          break;
    271284        case SDL_MOUSEMOTION:
Note: See TracChangeset for help on using the changeset viewer.