Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes for resize

  • Loading branch information...
commit e82442885433b55dd70da77ac157d34b8846f438 1 parent 2ed653a
@kthakore kthakore authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/SDL/App.pm
View
6 lib/SDL/App.pm
@@ -15,7 +15,7 @@ use SDL::Video;
use SDL::Event;
use SDL::Events;
use SDL::Surface;
-
+use SDL::PixelFormat;
our @ISA = qw(SDL::Surface);
sub DESTROY {
@@ -98,8 +98,8 @@ sub resize ($$$) {
my ($self,$w,$h) = @_;
my $flags = $self->flags;
if ( $flags & SDL_RESIZABLE) {
- my $bpp = $self->bpp;
- $self = SDL::set_video_mode($w,$h,$bpp,$flags) or die "SDL cannot set video:".SDL::get_error;
+ my $bpp = $self->format->BitsPerPixel;
+ $self = SDL::Video::set_video_mode($w,$h,$bpp,$flags) or die "SDL cannot set video:".SDL::get_error;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.