mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-29 16:31:05 +02:00
infoviewer_bb: don't start HDD percent thread once per second
Only start the HDD percent determination once per infobar display
Signed-off-by: Jacek Jendrzej <crashdvb@googlemail.com>
Origin commit data
------------------
Commit: d78bb41e3b
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-02-17 (Sun, 17 Feb 2013)
This commit is contained in:
committed by
Jacek Jendrzej
parent
845cd43ebc
commit
effb1aaeab
@@ -108,6 +108,13 @@ void CInfoViewerBB::Init()
|
|||||||
tmp_bbButtonInfoText[i] = "";
|
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;
|
InfoHeightY_Info = g_Font[SNeutrinoSettings::FONT_TYPE_INFOBAR_SMALL]->getHeight() + 5;
|
||||||
setBBOffset();
|
setBBOffset();
|
||||||
|
|
||||||
@@ -614,13 +621,6 @@ void CInfoViewerBB::showSysfsHdd()
|
|||||||
percent = (u * 100ULL) / t;
|
percent = (u * 100ULL) / t;
|
||||||
showBarSys(percent);
|
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)
|
if (check_dir(g_settings.network_nfs_recordingdir) == 0)
|
||||||
showBarHdd(hddpercent);
|
showBarHdd(hddpercent);
|
||||||
else
|
else
|
||||||
|
Reference in New Issue
Block a user