Added patch for die error
Kartik Thakore [Sun, 2 Aug 2009 15:16:30 +0000 (11:16 -0400)]
lib/SDL/App.pm

index 42b4122..f13d227 100644 (file)
@@ -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);
        }
 }