try to fix tv <-> radio switch

Origin commit data
------------------
Commit: e105155830
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-11-03 (Fri, 03 Nov 2017)

Origin message was:
------------------
- try to fix tv <-> radio switch
This commit is contained in:
vanhofen
2017-11-03 09:36:20 +01:00
parent f031dfa928
commit 00653d3f8a
2 changed files with 11 additions and 4 deletions

View File

@@ -768,6 +768,7 @@ void CRemoteControl::stopvideo()
void CRemoteControl::radioMode()
{
printf("CRemoteControl::radioMode\n");
g_Zapit->setMode( CZapitClient::MODE_RADIO );
}

View File

@@ -4244,8 +4244,14 @@ void CNeutrinoApp::saveEpg(bool cvfd_mode)
void CNeutrinoApp::tvMode( bool rezap )
{
if (mode == mode_webradio) {
CMoviePlayerGui::getInstance().setLastMode(mode_unknown);
CMoviePlayerGui::getInstance().stopPlayBack();
CVFD::getInstance()->ShowIcon(FP_ICON_TV, false);
rezap = true;
}
INFO("rezap %d current mode %d", rezap, mode);
if (mode == mode_radio) {
if (mode == mode_radio || mode == mode_webradio) {
if (g_settings.radiotext_enable && g_Radiotext) {
delete g_Radiotext;
g_Radiotext = NULL;
@@ -4276,7 +4282,7 @@ void CNeutrinoApp::tvMode( bool rezap )
CRecordManager::getInstance()->StopAutoRecord();
}
#endif
if (mode != mode_webtv && mode != mode_webradio) {
if (mode != mode_webtv) {
frameBuffer->useBackground(false);
frameBuffer->paintBackground();
}
@@ -4514,7 +4520,7 @@ void CNeutrinoApp::radioMode( bool rezap)
{
//printf("radioMode: rezap %s\n", rezap ? "yes" : "no");
INFO("rezap %d current mode %d", rezap, mode);
if (mode == mode_webtv || mode == mode_webradio) {
if (mode == mode_webtv) {
CMoviePlayerGui::getInstance().setLastMode(mode_unknown);
CMoviePlayerGui::getInstance().stopPlayBack();
CVFD::getInstance()->ShowIcon(FP_ICON_TV, false);
@@ -4539,7 +4545,7 @@ void CNeutrinoApp::radioMode( bool rezap)
#endif
CRecordManager::getInstance()->StopAutoRecord();
if (mode != mode_webtv && mode != mode_webradio) {
if (mode != mode_webtv) {
frameBuffer->useBackground(false);
frameBuffer->paintBackground();
}