mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 09:21:09 +02:00
dboxinfo: use hw_caps instead of parsing /proc/cpuinfo
Origin commit data
------------------
Commit: d5981cb299
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2013-12-30 (Mon, 30 Dec 2013)
This commit is contained in:
@@ -327,6 +327,7 @@ void CDBoxInfoWidget::paint()
|
|||||||
}
|
}
|
||||||
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getWidth();
|
int fw = g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->getWidth();
|
||||||
std::string title(g_Locale->getText(LOCALE_EXTRA_DBOXINFO));
|
std::string title(g_Locale->getText(LOCALE_EXTRA_DBOXINFO));
|
||||||
|
#if 0
|
||||||
std::map<std::string,std::string> cpuinfo;
|
std::map<std::string,std::string> cpuinfo;
|
||||||
in.open("/proc/cpuinfo");
|
in.open("/proc/cpuinfo");
|
||||||
if (in.is_open()) {
|
if (in.is_open()) {
|
||||||
@@ -348,6 +349,11 @@ void CDBoxInfoWidget::paint()
|
|||||||
title += ": ";
|
title += ": ";
|
||||||
title + cpuinfo["machine"];
|
title + cpuinfo["machine"];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
title += ": ";
|
||||||
|
title += g_info.hw_caps->boxvendor;
|
||||||
|
title += " ";
|
||||||
|
title += g_info.hw_caps->boxname;
|
||||||
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+(fw/3)+HeadiconOffset,y+hheight+1,
|
g_Font[SNeutrinoSettings::FONT_TYPE_MENU_TITLE]->RenderString(x+(fw/3)+HeadiconOffset,y+hheight+1,
|
||||||
width-((fw/3)+HeadiconOffset), title, COL_MENUHEAD_TEXT, 0, true); // UTF-8
|
width-((fw/3)+HeadiconOffset), title, COL_MENUHEAD_TEXT, 0, true); // UTF-8
|
||||||
frameBuffer->paintIcon(iconfile, x + fw/4, y, hheight);
|
frameBuffer->paintIcon(iconfile, x + fw/4, y, hheight);
|
||||||
|
Reference in New Issue
Block a user