From 9eeea78fb8e0a3e687206681da2d6eaf3a62116c Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 14 Nov 2018 15:32:24 +0100 Subject: [PATCH] screensaver.cpp: start clock only if not running --- src/gui/screensaver.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/screensaver.cpp b/src/gui/screensaver.cpp index 858524271..92aa29a43 100644 --- a/src/gui/screensaver.cpp +++ b/src/gui/screensaver.cpp @@ -325,7 +325,8 @@ void CScreenSaver::paint() int x_random = rand() % ((g_settings.screen_EndX - w_cl - g_settings.screen_StartX) + 1) + g_settings.screen_StartX; int y_random = rand() % ((g_settings.screen_EndY - h_cl - g_settings.screen_StartY) + 1) + g_settings.screen_StartY; scr_clock->setPos(x_random, y_random); - scr_clock->Start(); + if (!scr_clock->isRun()) + scr_clock->Start(); if (g_settings.screensaver_mode == SCR_MODE_CLOCK_COLOR) { srand (time(NULL));