From ed97434fbf82ad7ba52266c0480d26e005d7b5c8 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Fri, 24 Sep 2021 22:52:05 +0200 Subject: [PATCH] epgview: auto-calc buttons struct Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/1f211824051bcbc539eaccb91120d7fd22d985c6 Author: vanhofen Date: 2021-09-24 (Fri, 24 Sep 2021) Origin message was: ------------------ - epgview: auto-calc buttons struct ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/epgview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 5dc97c1aa..17ceab3f3 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -1651,7 +1651,7 @@ void CEpgData::showProgressBar() #define TV_BUTTONS 0 #define MP_BUTTONS 1 -struct button_label EpgButtons[][5] = +struct button_label EpgButtons[][4] = { { // TV_BUTTONS @@ -1684,7 +1684,7 @@ void CEpgData::showTimerEventBar (bool pshow, bool adzap, bool mp_info) } int UsedButtons = mp_info ? MP_BUTTONS : TV_BUTTONS; - int MaxButtons = mp_info ? 2 : 4; //TODO: auto-calc from struct + int MaxButtons = sizeof(EpgButtons[UsedButtons])/sizeof(button_label); std::string adzap_button; if (adzap)