X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Video.html-inc;h=715163120a0a791b356c559b64d0ba2a1a6981e6;hb=411e0b6a19b323b88847fbffe2323afe98e9f8dc;hp=32ebba2a43f45fee69429767275d0cc5e5a85c12;hpb=9b105a174c47bf270f320086452ef5d26c53fe35;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Video.html-inc b/pages/SDL-Video.html-inc index 32ebba2..7151631 100644 --- a/pages/SDL-Video.html-inc +++ b/pages/SDL-Video.html-inc @@ -97,8 +97,8 @@

SYNOPSIS

Top

-
 use SDL ':init';
- use SDL::Video ':all';
+
 use SDL;
+ use SDL::Video;
  use SDL::Surface;
  use SDL::Rect;
 
@@ -129,11 +129,11 @@
 

CONSTANTS

Top

-

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

-
 use SDL::Video ':all';
+

The constants are exported by default. You can avoid this by doing:

+
 use SDL::Video ();
 
 
-

or access them directly:

+

and access them directly:

 SDL::Video::SDL_SWSURFACE;
 
 
@@ -275,8 +275,14 @@ word identifier like "x11", "windib" my @modes = @{ SDL::Video::list_modes( $pixel_format, $flags ) };
-

Returns a ref to an array of available screen dimensions for the given format and video flags, -or it return undef if no modes are available.

+

Returns a reference to an array:

+ + +

Note: <list_modes> should be called before the video_mode ist set. Otherwise you will always get 'all'.

Example:

 use SDL;
  use SDL::Video;
@@ -293,9 +299,9 @@ or it return undef if no modes are available.

if($#modes > 0) { print("available modes:\n"); - foreach my $index ( @modes ) + foreach my $mode ( @modes ) { - printf("%03d: %d x %d\n", $index, $modes[$index]->w, $modes[$index]->h ); + printf("%d x %d\n", $mode->w, $mode->h ); } } elsif($#modes == 0)