X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL.html-inc;fp=pages%2FSDL.html-inc;h=bb561e5541c6b0089f0f548a1d38c66963dd7522;hb=3065276381925b3e87e7851f9a52df76064b9916;hp=c1cdfb659de1adecafe2b596f465145a2e300eb2;hpb=793cad595fa968121607bef381fcddd84d599a77;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL.html-inc b/pages/SDL.html-inc index c1cdfb6..bb561e5 100644 --- a/pages/SDL.html-inc +++ b/pages/SDL.html-inc @@ -139,23 +139,31 @@ per class basis.

init(flags)

As with the C language API, SDL_perl initializes the SDL environment through -the SDL::init subroutine. This routine takes a mode flag constructed through -the bitwise OR product of the following constants:

+the SDL::init subroutine. This routine takes a mode flag constructed through +the bitwise OR product of the SDL_INIT_* constants.

+

The constants are not exported by default. You can export them into your namespace by doing:

+
 use SDL ':all';
+
+
+

or access them directly:

+
 SDL::SDL_INIT_AUDIO;
+
+
* -INIT_AUDIO
+SDL_INIT_AUDIO
* -INIT_VIDEO
+SDL_INIT_VIDEO
* -INIT_CDROM
+SDL_INIT_CDROM
* -INIT_EVERYTHING
+SDL_INIT_EVERYTHING
* -INIT_NOPARACHUTE
+SDL_INIT_NOPARACHUTE
* -INIT_JOYSTICK
+SDL_INIT_JOYSTICK
* -INIT_TIMER
+SDL_INIT_TIMER

SDL::Init returns 0 on success, or -1 on error.

@@ -242,10 +250,6 @@ it doesn't returns any values.

Unknown SDL error

- - - -

Note 1: SDL_LASTERROR marks the highest numbered predefined error. Note 2: SDL also defines SDL_OutOfMemory() and SDL_Unsupported() for internal use which are equivalent to SDL_Error(SDL_ENOMEM) and SDL_Error(SDL_UNSUPPORTED) respectively.