From 6259467ac82bc325f9b15d83d0cd1af4f0e12bd1 Mon Sep 17 00:00:00 2001 From: svenhoefer Date: Fri, 3 Nov 2017 09:36:20 +0100 Subject: [PATCH] - try to fix tv <-> radio switch Signed-off-by: Thilo Graf --- src/daemonc/remotecontrol.cpp | 1 + src/neutrino.cpp | 14 ++++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/daemonc/remotecontrol.cpp b/src/daemonc/remotecontrol.cpp index 271ec3fe6..a9ad8313b 100644 --- a/src/daemonc/remotecontrol.cpp +++ b/src/daemonc/remotecontrol.cpp @@ -767,6 +767,7 @@ void CRemoteControl::stopvideo() void CRemoteControl::radioMode() { +printf("CRemoteControl::radioMode\n"); g_Zapit->setMode( CZapitClient::MODE_RADIO ); } diff --git a/src/neutrino.cpp b/src/neutrino.cpp index 6d216b885..8e7169f33 100644 --- a/src/neutrino.cpp +++ b/src/neutrino.cpp @@ -4031,8 +4031,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; @@ -4063,7 +4069,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(); } @@ -4286,7 +4292,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); @@ -4311,7 +4317,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(); }