Merge pull request #225 from jrassa/carousel-fix-single-system

properly render carousel for system configured with only 1 system
This commit is contained in:
John Rassa 2017-08-24 20:34:00 -04:00 committed by GitHub
commit 0b0e0adce6

View file

@ -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)