port code to SDL 2.0, or try