diff --git a/HISTORY b/HISTORY index 726b379..a85d835 100644 --- a/HISTORY +++ b/HISTORY @@ -17,4 +17,5 @@ Version 0.0.2 - added discusage icons to menu header view element so that it discusage can be displayed in every menu view - added numeric day, month and year tokens in different view elements - support for global variables type "double" -- added setup options to configure rerun display behaviour +- added setup options to configure rerun display behaviour +- changed display of menu lists, do flush first after complete rendering diff --git a/displaymenu.c b/displaymenu.c index 73e489d..6764699 100644 --- a/displaymenu.c +++ b/displaymenu.c @@ -76,6 +76,7 @@ bool cSDDisplayMenu::SetItemEvent(const cEvent *Event, int Index, bool Current, return true; if (!rootView->SubViewAvailable()) return false; + rootView->LockFlush(); if (Current) { if (Channel) { rootView->SetChannel(Channel); @@ -97,6 +98,7 @@ bool cSDDisplayMenu::SetItemTimer(const cTimer *Timer, int Index, bool Current, return true; if (!rootView->SubViewAvailable()) return false; + rootView->LockFlush(); cDisplayMenuListView *list = rootView->GetListView(); if (!list) return false; @@ -111,6 +113,7 @@ bool cSDDisplayMenu::SetItemChannel(const cChannel *Channel, int Index, bool Cur return true; if (!rootView->SubViewAvailable()) return false; + rootView->LockFlush(); cDisplayMenuListView *list = rootView->GetListView(); if (!list) return false; @@ -125,6 +128,7 @@ bool cSDDisplayMenu::SetItemRecording(const cRecording *Recording, int Index, bo return true; if (!rootView->SubViewAvailable()) return false; + rootView->LockFlush(); cDisplayMenuListView *list = rootView->GetListView(); if (!list) return false; @@ -141,6 +145,7 @@ void cSDDisplayMenu::SetItem(const char *Text, int Index, bool Current, bool Sel if (!list) { return; } + rootView->LockFlush(); eMenuCategory cat = MenuCategory(); if (cat == mcMain) { list->AddMainMenuItem(Index, Text, Current, Selectable); @@ -208,26 +213,32 @@ void cSDDisplayMenu::SetText(const char *Text, bool FixedFont) { void cSDDisplayMenu::Flush(void) { if (!doOutput) return; + bool doFlush = false; if (state == vsInit) { rootView->Start(); rootView->RenderMenuItems(); - rootView->DoFlush(); + doFlush = true; } else if (state == vsMenuInit) { rootView->Render(); - rootView->DoFlush(); rootView->RenderMenuItems(); - rootView->DoFlush(); + doFlush = true; } else if (state == vsMenuUpdate) { rootView->RenderMenuItems(); - rootView->DoFlush(); + doFlush = true; } else if (state == vsMenuDetail) { + rootView->OpenFlush(); rootView->Render(); rootView->DoFlush(); rootView->RenderDetailView(); rootView->DoFlush(); } else { - if (rootView->RenderDynamicElements()) - rootView->DoFlush(); + if (rootView->RenderDynamicElements()) { + doFlush = true; + } + } + if (doFlush) { + rootView->OpenFlush(); + rootView->DoFlush(); } state = vsIdle; } diff --git a/libcore/pixmapcontainer.h b/libcore/pixmapcontainer.h index 06f9104..3904f16 100644 --- a/libcore/pixmapcontainer.h +++ b/libcore/pixmapcontainer.h @@ -27,8 +27,6 @@ protected: void SetInitFinished(void) { pixContainerInit = false; }; bool CreateOsd(int Left, int Top, int Width, int Height); void DeleteOsdOnExit(void) { deleteOsdOnExit = true; }; - void LockFlush(void); - void OpenFlush(void); //Wrappers for access to pixmaps bool PixmapExists(int num); int NumPixmaps(void) { return numPixmaps; }; @@ -66,6 +64,8 @@ protected: public: cPixmapContainer(int numPixmaps); virtual ~cPixmapContainer(void); + void LockFlush(void); + void OpenFlush(void); void DoFlush(void); virtual void Action(void) {}; };