From e01a63b29e9f1f9ef33221d1f2f8d23673183d3b Mon Sep 17 00:00:00 2001 From: kamel5 Date: Tue, 9 Apr 2019 13:52:07 +0200 Subject: [PATCH] Optimizations in setup menu --- setup.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/setup.c b/setup.c index e040b8e..9499a1f 100644 --- a/setup.c +++ b/setup.c @@ -236,11 +236,16 @@ void cMenuSetupGeneral::Set(void) { } eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) { + bool olduseNopacityTheme = tmpTvguideConfig->useNopacityTheme; + bool olddisplayRerunsDetailEPGView = tmpTvguideConfig->displayRerunsDetailEPGView; eOSState state = cOsdMenu::ProcessKey(Key); if (Key == kOk) { state = osBack; } else if (Key != kNone) { - Set(); + if (tmpTvguideConfig->useNopacityTheme != olduseNopacityTheme || + tmpTvguideConfig->displayRerunsDetailEPGView != olddisplayRerunsDetailEPGView) { + Set(); + } } return state; } @@ -317,11 +322,22 @@ void cMenuSetupScreenLayout::Set(void) { } eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) { + int olddisplayMode = tmpTvguideConfig->displayMode; + bool olddisplayStatusHeader = tmpTvguideConfig->displayStatusHeader; + bool olddisplayChannelGroups = tmpTvguideConfig->displayChannelGroups; + int oldhideChannelLogos = tmpTvguideConfig->hideChannelLogos; + int oldhideEpgImages = tmpTvguideConfig->hideEpgImages; eOSState state = cOsdMenu::ProcessKey(Key); if (Key == kOk) { state = osBack; } else if (Key != kNone) { - Set(); + if (tmpTvguideConfig->displayMode != olddisplayMode || + tmpTvguideConfig->displayStatusHeader != olddisplayStatusHeader || + tmpTvguideConfig->displayChannelGroups != olddisplayChannelGroups || + tmpTvguideConfig->hideChannelLogos != oldhideChannelLogos || + tmpTvguideConfig->hideEpgImages != oldhideEpgImages) { + Set(); + } } return state; }