Several fixes (fill_rect, pods/) #227

Closed
wants to merge 5 commits into
from
View
@@ -152,6 +152,16 @@ sub set_file_flags {
$self->notes( 'file_flags' => \%file_flags );
}
+sub process_pod_files {
+ my ($self, $ext) = @_;
+
+ my $files = $self->_find_file_by_type($ext, 'lib');
+ while (my ($file, $dest) = each %$files) {
+ $dest =~ s!^lib/\Kpods/!!;
+ $self->copy_if_modified(from => $file, to => File::Spec->catfile($self->blib, $dest));
+ }
+}
+
# override the following functions in My::Builder::<platform> if necessary
sub ACTION_build {
my $self = shift;
View
@@ -422,11 +422,19 @@ save_BMP ( surface, filename )
RETVAL
int
-fill_rect ( dest, dest_rect, pixel )
+fill_rect ( dest, dest_rect_bag, pixel )
SDL_Surface *dest
- SDL_Rect *dest_rect
+ SV *dest_rect_bag
Uint32 pixel
CODE:
+ SDL_Rect *dest_rect = NULL;
+
+ if (SvOK(dest_rect_bag))
+ dest_rect = (SDL_Rect *)bag2obj(dest_rect_bag);
+
+ if (dest_rect && (!dest_rect->w || !dest_rect->h))
+ dest_rect = NULL;
+
RETVAL = SDL_FillRect(dest,dest_rect,pixel);
OUTPUT:
RETVAL