sdl2: code cleanup