From 457f2c180c4a2c592518e6cde08c58d8eecf8774 Mon Sep 17 00:00:00 2001 From: emb <> Date: Thu, 1 Jan 2015 15:19:47 -0600 Subject: [PATCH] Bugfix: attract mode not operating as intended. --- Source/RetroFE.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Source/RetroFE.cpp b/Source/RetroFE.cpp index 94b46f6..361694e 100644 --- a/Source/RetroFE.cpp +++ b/Source/RetroFE.cpp @@ -158,7 +158,6 @@ bool RetroFE::DeInitialize() void RetroFE::Run() { int attractModeTime = 0; - bool attractMode = false; std::string firstCollection = "Main"; Config.GetProperty("attractModeTime", attractModeTime); @@ -298,21 +297,21 @@ void RetroFE::Run() InactiveKeyTime += deltaTime; - if(!AttractMode && InactiveKeyTime > attractModeTime) + if(!AttractMode && InactiveKeyTime > attractModeTime && attractModeTime > 0) { AttractMode = true; InactiveKeyTime = 0; attractModeRandomTime = ((float)((1000+rand()) % 5000)) / 1000; } - if(attractMode) + if(AttractMode) { page->SetScrolling(Page::ScrollDirectionForward); if(InactiveKeyTime > attractModeRandomTime) { InactiveKeyTime = 0; - attractMode = false; + AttractMode = false; page->SetScrolling(Page::ScrollDirectionIdle); } }