radiotext: rework radiotext handling

Radiotext moved into a separate class and will be shown with screensaver.
This commit is contained in:
2020-01-05 21:17:59 +01:00
parent b1f9c3c7f3
commit df64925b30
12 changed files with 732 additions and 192 deletions

View File

@@ -13,6 +13,7 @@
#include <gui/timeosd.h>
#include <gui/volumebar.h>
#include <gui/osd_helpers.h>
#include <gui/radiotext_window.h>
#include <hardware/video.h>
@@ -41,6 +42,7 @@ COsdHelpers* COsdHelpers::getInstance()
#ifdef ENABLE_CHANGE_OSD_RESOLUTION
void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bool forceOsdReset/*=false*/)
{
OnBeforeChangeResolution();
size_t idx = 0;
bool resetOsd = false;
uint32_t modeNew;
@@ -97,7 +99,7 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo
//printf("\n>>>>>[%s:%d] New res: %dx%dx%d\n \n", __func__, __LINE__, resW, resH, bpp);
g_settings.osd_resolution = modeNew;
if (InfoClock)
InfoClock->disableInfoClock();
InfoClock->StopInfoClock(true);
frameBuffer->Clear();
if (resetOsd) {
CNeutrinoApp::getInstance()->setScreenSettings();
@@ -122,6 +124,11 @@ void COsdHelpers::changeOsdResolution(uint32_t mode, bool automode/*=false*/, bo
g_InfoViewer->showTitle(CNeutrinoApp::getInstance()->channelList->getActiveChannel(), true, 0, true);
CNeutrinoApp::getInstance()->StartSubtitles();
}
if (g_RadiotextWin) {
delete g_RadiotextWin;
g_RadiotextWin = new CRadioTextGUI();
g_RadiotextWin->allowPaint(false);
}
}
OnAfterChangeResolution();
}