sdl: use sdl function instead of macros