From: Kartik Thakore Date: Sat, 22 Aug 2009 22:03:39 +0000 (-0400) Subject: Added patch to selectively init Modes for SDL::APP and also moved to v2.2.2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c383be076c5470284c38b971e8b96e092621c5aa;p=sdlgit%2FSDL_perl.git Added patch to selectively init Modes for SDL::APP and also moved to v2.2.2 --- diff --git a/lib/SDL.pm b/lib/SDL.pm index 4dff767..eee779e 100644 --- a/lib/SDL.pm +++ b/lib/SDL.pm @@ -55,7 +55,7 @@ sub import { SDL::Constants->export_to_level(1); } -$VERSION = '2.2.1'; +$VERSION = '2.2.2'; print "$VERSION" if (defined($ARGV[0]) && ($ARGV[0] eq '--SDLperl')); diff --git a/lib/SDL/App.pm b/lib/SDL/App.pm index 9a152e7..b9eaa12 100644 --- a/lib/SDL/App.pm +++ b/lib/SDL/App.pm @@ -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;