added processEvents() to Pengine to handle SDL_Events