From: Kartik Thakore Date: Sun, 2 Aug 2009 15:16:30 +0000 (-0400) Subject: Added patch for die error X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f81cdb555a4e0a8da891df28be7a37bf398788b;p=sdlgit%2FSDL_perl.git Added patch for die error --- diff --git a/lib/SDL/App.pm b/lib/SDL/App.pm index 42b4122..f13d227 100644 --- a/lib/SDL/App.pm +++ b/lib/SDL/App.pm @@ -80,8 +80,8 @@ sub new { } else { $SDL::App::USING_OPENGL = 0; } - - my $self = \SDL::SetVideoMode($w,$h,$d,$f) + my $self = SDL::SetVideoMode($w,$h,$d,$f); + $$self or die SDL::GetError(); if ($ic and -e $ic) { @@ -100,7 +100,7 @@ sub resize ($$$) { my $flags = SDL::SurfaceFlags($$self); if ( $flags & SDL::SDL_RESIZABLE()) { my $bpp = SDL::SurfaceBitsPerPixel($$self); - $self = \SDL::SetVideoMode($w,$h,$bpp,$flags); + $$self = SDL::SetVideoMode($w,$h,$bpp,$flags); } }