From 8d91ffad1dc4e21c4138951d1c0f1058e672bede Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Wed, 3 Jan 2018 22:35:01 +0100 Subject: [PATCH] CInfoViewer: reduce paint box calls for record mode Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/244cb226c429ea130b7a50209ec5736952732643 Author: Thilo Graf Date: 2018-01-03 (Wed, 03 Jan 2018) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index ebe22a7c9..b607f3981 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -397,12 +397,18 @@ void CInfoViewer::showRecordIcon (const bool show) } else { - if (rec_mode == CRecordManager::RECMODE_REC) - frameBuffer->paintBoxRel(rec_icon_x, icon_y, rec_icon_w, icon_h, COL_INFOBAR_PLUS_0); - else if (rec_mode == CRecordManager::RECMODE_TSHIFT) - frameBuffer->paintBoxRel(ts_icon_x, icon_y, ts_icon_w, icon_h, COL_INFOBAR_PLUS_0); - else if (rec_mode == CRecordManager::RECMODE_REC_TSHIFT) - frameBuffer->paintBoxRel(ts_icon_x, icon_y, ts_icon_w + rec_icon_w + icon_space*2, icon_h, COL_INFOBAR_PLUS_0); + int icon_x, icon_w; + if (rec_mode == CRecordManager::RECMODE_REC){ + icon_x = rec_icon_x; + icon_w = rec_icon_w; + }else if (rec_mode == CRecordManager::RECMODE_TSHIFT){ + icon_x = ts_icon_x; + icon_w = ts_icon_w; + }else if (rec_mode == CRecordManager::RECMODE_REC_TSHIFT){ + icon_x = ts_icon_x; + icon_w = ts_icon_w + rec_icon_w + icon_space*2; + } + PaintBoxRel(icon_x, icon_y, icon_w, icon_h, COL_INFOBAR_PLUS_0); } } }