Skip to content

Commit

Permalink
EVENTS: Register one custom event with SDL (ITC)
Browse files Browse the repository at this point in the history
  • Loading branch information
DrMcCoy committed Feb 4, 2014
1 parent 98fe5f3 commit 0eba471
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/events/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ void EventsManager::init() {

initJoysticks();

SDL_RegisterEvents(1);

std::srand(getTimestamp());
SDL_StopTextInput();
}
Expand Down Expand Up @@ -200,7 +202,6 @@ void EventsManager::processEvents() {

Event event;
while (SDL_PollEvent(&event)) {

// Check repeated event.
if (((event.type == kEventKeyDown) || (event.type == kEventKeyUp)) &&
event.key.repeat && !_repeat)
Expand Down

0 comments on commit 0eba471

Please sign in to comment.