From 3f16bb66abc332de9f324565e6f8d8071c2d4c15 Mon Sep 17 00:00:00 2001 From: Thomas Nigro <tn@thomasnigro.fr> Date: Mon, 23 May 2016 17:30:30 +0200 Subject: [PATCH] Slideshow: only use a single image --- app/VLC_WinRT.Slideshow/Images/ImgSlideshow.cs | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/app/VLC_WinRT.Slideshow/Images/ImgSlideshow.cs b/app/VLC_WinRT.Slideshow/Images/ImgSlideshow.cs index 06030e45b..b977d8890 100644 --- a/app/VLC_WinRT.Slideshow/Images/ImgSlideshow.cs +++ b/app/VLC_WinRT.Slideshow/Images/ImgSlideshow.cs @@ -45,7 +45,6 @@ namespace Slide2D.Images private int ImgIndex = 0; private Img currentImg; - private List<Img> images = new List<Img>(); public ImgSlideshow() { @@ -74,7 +73,7 @@ namespace Slide2D.Images { if (album.IsPictureLoaded) { - images.Add(new Img(album.AlbumCoverFullUri)); + currentImg = new Img(album.AlbumCoverFullUri); newPic = true; } } @@ -248,23 +247,8 @@ namespace Slide2D.Images sender.Paused = true; } - // Choosing a new img to display in the next loop - getNextImg(); frame = 0; blurAmount = MaximumBlur; } - - void getNextImg() - { - Debug.WriteLine($"Choosing a picture out of {images.Count} pictures."); - if (images.Count == 0) return; - int nextImgIndex = 0; - if (images.Count > 2) - nextImgIndex = random.Next(0, images.Count - 1); - else if (images.Count > 1) - nextImgIndex = random.NextDouble() < 0.5 ? 0 : 1; - currentImg = images[nextImgIndex]; - Debug.WriteLine($"Choose picture uri = {currentImg.Src}"); - } } } -- GitLab