Permalink
Browse files

sort array of pictures

  • Loading branch information...
1 parent 853e769 commit 48959ea175c60233e46395ea72de1f5ce9ec187f @rkoeppl rkoeppl committed May 5, 2016
Showing with 4 additions and 1 deletion.
  1. +4 −1 modules/printengine.pl
View
@@ -214,14 +214,17 @@
&& -f "$dir/$_" # and is a file
} readdir(DIR);
closedir(DIR);
+ #sort array
+ my @pics_sorted=sort @pics
+ print @pics_sorted;
#builtin framebuffer access
my $fb = Graphics::Framebuffer->new( FB_DEVICE=>$display_device, SPLASH=>0 );
$fb->clear_screen('OFF');
$fb->blit_write(
$fb->load_image(
{ 'center' => $fb->{'CENTER_XY'},
- 'file' => "$dir/$pics[0]" # Usually needs full path
+ 'file' => "$dir/$pics_sorted[0]" # Usually needs full path
}
)
);

0 comments on commit 48959ea

Please sign in to comment.