Optimizations in setup menu

This commit is contained in:
kamel5 2019-04-09 13:52:07 +02:00
parent 0975e97519
commit e01a63b29e

16
setup.c
View File

@ -236,12 +236,17 @@ void cMenuSetupGeneral::Set(void) {
} }
eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) { eOSState cMenuSetupGeneral::ProcessKey(eKeys Key) {
bool olduseNopacityTheme = tmpTvguideConfig->useNopacityTheme;
bool olddisplayRerunsDetailEPGView = tmpTvguideConfig->displayRerunsDetailEPGView;
eOSState state = cOsdMenu::ProcessKey(Key); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) { if (Key == kOk) {
state = osBack; state = osBack;
} else if (Key != kNone) { } else if (Key != kNone) {
if (tmpTvguideConfig->useNopacityTheme != olduseNopacityTheme ||
tmpTvguideConfig->displayRerunsDetailEPGView != olddisplayRerunsDetailEPGView) {
Set(); Set();
} }
}
return state; return state;
} }
@ -317,12 +322,23 @@ void cMenuSetupScreenLayout::Set(void) {
} }
eOSState cMenuSetupScreenLayout::ProcessKey(eKeys Key) { 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); eOSState state = cOsdMenu::ProcessKey(Key);
if (Key == kOk) { if (Key == kOk) {
state = osBack; state = osBack;
} else if (Key != kNone) { } else if (Key != kNone) {
if (tmpTvguideConfig->displayMode != olddisplayMode ||
tmpTvguideConfig->displayStatusHeader != olddisplayStatusHeader ||
tmpTvguideConfig->displayChannelGroups != olddisplayChannelGroups ||
tmpTvguideConfig->hideChannelLogos != oldhideChannelLogos ||
tmpTvguideConfig->hideEpgImages != oldhideEpgImages) {
Set(); Set();
} }
}
return state; return state;
} }