Make surfaces work again (bad hack though)
Leon Brocard [Thu, 15 Oct 2009 14:51:19 +0000 (15:51 +0100)]
lib/SDL/App.pm
src/SDL.xs
t/intergation1.t

index e5a6cdc..c924579 100644 (file)
@@ -112,7 +112,7 @@ sub new {
                $SDL::App::USING_OPENGL = 0;
        }
 
-       my $self = \SDL::SetVideoMode($w,$h,$d,$f)
+       my $self = SDL::SetVideoMode('SDL::Surface',$w,$h,$d,$f)
                or croak SDL::GetError();
        
        if ($ic and -e $ic) {
index cc0d135..4d41a37 100644 (file)
@@ -1240,14 +1240,14 @@ PaletteNColors ( palette, ... )
                RETVAL
 
 SDL_Surface *
-SetVideoMode ( width, height, bpp, flags )
+SetVideoMode ( CLASS, width, height, bpp, flags )
+        char* CLASS
        int width
        int height
        int bpp
        Uint32 flags
 
        CODE:
-               char* CLASS;
                RETVAL = SDL_SetVideoMode(width,height,bpp,flags);
        OUTPUT:
                RETVAL
index 69c4e07..68a6f92 100644 (file)
@@ -76,7 +76,6 @@ my $app  = SDL::App->new(-title => "Test", -width => 640, -height => 480, -init
                0x33,
        );
 
-
        my $grect = SDL::Game::Rect->new(10, 10, 30, 35);
        foreach(0..80)
        {
@@ -88,10 +87,7 @@ my $app  = SDL::App->new(-title => "Test", -width => 640, -height => 480, -init
        $app->fill_rect($rect, $blue);
        $app->fill_rect($grect, $col);
 
-
-       $app->update_rects($rect);
-       $app->update_rects($grect);
-       $app->sync;
+        SDL::Surface::update_rect($app, 0, 0, 0, 0);
        }
 
          sleep(1);