use new flag implementation same as rust-sdl2
Merge pull request #7 from andelf/master

use new flag implementation same as rust-sdl2