more SDL porting stuff