From c6a0449be00b43956b8be9a303791fc5c94c31d0 Mon Sep 17 00:00:00 2001 From: jrassa Date: Wed, 23 Aug 2017 21:49:47 -0400 Subject: [PATCH] properly render carousel for system configured with only 1 system --- es-app/src/views/SystemView.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/es-app/src/views/SystemView.cpp b/es-app/src/views/SystemView.cpp index 999ac79ca..b6f409062 100644 --- a/es-app/src/views/SystemView.cpp +++ b/es-app/src/views/SystemView.cpp @@ -466,8 +466,15 @@ void SystemView::renderCarousel(const Eigen::Affine3f& trans) // Adding texture loading buffers depending on scrolling speed and status int bufferIndex = getScrollingVelocity() + 1; + int bufferLeft = logoBuffersLeft[bufferIndex]; + int bufferRight = logoBuffersRight[bufferIndex]; + if (logoCount == 1) + { + bufferLeft = 0; + bufferRight = 0; + } - for (int i = center - logoCount / 2 + logoBuffersLeft[bufferIndex]; i <= center + logoCount / 2 + logoBuffersRight[bufferIndex]; i++) + for (int i = center - logoCount / 2 + bufferLeft; i <= center + logoCount / 2 + bufferRight; i++) { int index = i; while (index < 0)