From: Leon Brocard Date: Thu, 15 Oct 2009 14:51:19 +0000 (+0100) Subject: Make surfaces work again (bad hack though) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a0f3f32a2856fb3ba37b5e1311162c20ee57d9ed;p=sdlgit%2FSDL_perl.git Make surfaces work again (bad hack though) --- diff --git a/lib/SDL/App.pm b/lib/SDL/App.pm index e5a6cdc..c924579 100644 --- a/lib/SDL/App.pm +++ b/lib/SDL/App.pm @@ -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) { diff --git a/src/SDL.xs b/src/SDL.xs index cc0d135..4d41a37 100644 --- a/src/SDL.xs +++ b/src/SDL.xs @@ -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 diff --git a/t/intergation1.t b/t/intergation1.t index 69c4e07..68a6f92 100644 --- a/t/intergation1.t +++ b/t/intergation1.t @@ -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);