From 1e4a2e30c1daf36dba1ec4dccc06e42785c326da Mon Sep 17 00:00:00 2001 From: Michael Liebmann Date: Thu, 15 Nov 2012 05:21:10 +0100 Subject: [PATCH] infoviewer_bb.cpp: Optimize display of simple resolution in the info bar Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/d9cf5197f4f4628fc57a32ee4dd8f0b0510704b9 Author: Michael Liebmann Date: 2012-11-15 (Thu, 15 Nov 2012) Origin message was: ------------------ * infoviewer_bb.cpp: Optimize display of simple resolution in the info bar --- src/gui/infoviewer_bb.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/src/gui/infoviewer_bb.cpp b/src/gui/infoviewer_bb.cpp index 58edd77a7..62c3bca74 100644 --- a/src/gui/infoviewer_bb.cpp +++ b/src/gui/infoviewer_bb.cpp @@ -542,29 +542,12 @@ void CInfoViewerBB::showIcon_Resolution() } if (g_settings.infobar_show_res == 1) {//show simple resolution icon on infobar videoDecoder->getPictureInfo(xres, yres, framerate); - switch (yres) { - case 1920: - case 1440: - case 1280: - case 1080: - case 1088: - case 720: + if (yres > 704) icon_name = NEUTRINO_ICON_RESOLUTION_HD; - break; - case 704: - case 576: - case 544: - case 528: - case 480: - case 382: - case 352: - case 288: + else if (yres >= 288) icon_name = NEUTRINO_ICON_RESOLUTION_SD; - break; - default: + else icon_name = NEUTRINO_ICON_RESOLUTION_000; - break; - } } } showBBIcons(CInfoViewerBB::ICON_RES, icon_name);