Merged to v2.2.2
Kartik Thakore [Sun, 23 Aug 2009 01:26:43 +0000 (21:26 -0400)]
lib/SDL.pm
lib/SDL/App.pm

index ec87c84..55a44b0 100644 (file)
@@ -54,8 +54,7 @@ sub import {
   $self->export_to_level(1, @_);
   SDL::Constants->export_to_level(1);
 }
-
-$VERSION = '2.2.1.8';
+$VERSION = '2.2.2';
 
 print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl'));
 
index 9a152e7..b9eaa12 100644 (file)
@@ -55,10 +55,16 @@ sub new {
                                -red_accum_size -ras -blue_accum_size -bas 
                                -green_accum_sizee -gas -alpha_accum_size -aas
                                -double_buffer -db -buffer_size -bs -stencil_size -st
-                               -asyncblit
+                               -asyncblit -init
                / ) if ($SDL::DEBUG);
 
-       SDL::Init(SDL::SDL_INIT_EVERYTHING());
+        # SDL_INIT_VIDEO() is 0, so check defined instead of truth.
+        my $init = defined $options{-init} ? $options{-init} :
+       SDL_INIT_EVERYTHING();
+       
+        SDL::Init($init);
+
+       #SDL::Init(SDL::SDL_INIT_EVERYTHING());
        
        my $t = $options{-title}        || $options{-t}         || $0;
        my $it = $options{-icon_title}  || $options{-it}        || $t;