Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
end
# Flags from `sys.sdl.img.initialize`
-extern class SDLImgInitFlags `{ int `}
+extern class SDLImgInitFlags `{ IMG_InitFlags `}
# Get the default empty flag set
new `{ return 0; `}
# TODO make this private and only called through `sys.sdl`
init internal do end
- # Initialize the given SDL `subsystems`
- fun initialize(subsystems: SDLInitFlags): Bool `{ return SDL_Init(subsystems); `}
+ # Initialize the given SDL `subsystems`, returns `false` on error
+ fun initialize(subsystems: SDLInitFlags): Bool `{ return SDL_Init(subsystems) == 0; `}
# Returns the latest SDL error
#