Smoother SDL IO event handler