Changed SDL_PollEvent to SDL_WaitEvent for performance