From fbd8630e414ba1ce09ae187f5f495ef9994a9be0 Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sun, 17 Feb 2013 18:06:29 +0100 Subject: [PATCH] infoviewer_bb: don't start HDD percent thread once per second Only start the HDD percent determination once per infobar display Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/19c754b5b9c08ef16af020c06f5ef1ce945f4158 Author: Stefan Seyfried Date: 2013-02-17 (Sun, 17 Feb 2013) ------------------ This commit was generated by Migit --- src/gui/infoviewer_bb.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index bc30f4bbf..9b133798f 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -114,6 +114,13 @@ void CInfoViewerBB::Init() tmp_bbButtonInfoText[i] = ""; } + // get HDD info in a separate thread + if (g_settings.infobar_show_sysfs_hdd && !hddperTflag) { + hddperTflag=true; + pthread_create(&hddperT, NULL, hddperThread, (void*) this); + pthread_detach(hddperT); + } + InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 5; setBBOffset(); @@ -602,13 +609,6 @@ void CInfoViewerBB::showSysfsHdd() percent = (u * 100ULL) / t; showBarSys(percent); - //HDD info in a seperate thread - if(!hddperTflag) { - hddperTflag=true; - pthread_create(&hddperT, NULL, hddperThread, (void*) this); - pthread_detach(hddperT); - } - if (check_dir(g_settings.network_nfs_recordingdir) == 0) showBarHdd(hddpercent); else