Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

SDLx::App doesn't initialize SDLx::Surface correctly #161

Closed
kthakore opened this Issue · 3 comments

1 participant

@kthakore
Owner

Variables from %options hash in the constructor of SDLx::App aren't correctly assigned to the surface object SDLx::App represents. In App.pm:

my $surface = SDL::Video::set_video_mode( $w, $h, $d, $f ) 
    or croak SDL::get_error();
$options{surface} = $surface;

my $self = SDLx::Surface->new(%options);

and in Surface.pm:

    if ( $options{surface} ) {
            $self = bless $options{surface}, $class;
    } else {
            my $width  = $options{width}  || $options{w};
            my $height = $options{height} || $options{h};
            ..
    }

This makes passing valuable options, like {green,red,blue,alpha}mask from SDLx::App constructor impossible.

@kthakore
Owner

Author: kthakore
Time: 1283640853
Field: status
Value: closed

@kthakore kthakore was assigned
@kthakore
Owner

Author: kthakore
Time: 1283640853
Field: resolution
Value: invalid

@kthakore
Owner

Author: kthakore
Time: 1283640853
Field: comment
Value:
The display made by SDL::Video::set_video_mode( $w, $h, $d, $f )

is what the app will be. It cannot have any masks.

http://sdl.beuc.net/sdl.wiki/SDL_SetVideoMode

@kthakore kthakore closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.