try to fix tv <-> radio switch

Signed-off-by: Thilo Graf <dbt@novatux.de>


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

Origin message was:
------------------
- try to fix tv <-> radio switch

Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
vanhofen
2017-11-03 09:36:20 +01:00
committed by Thilo Graf
parent be7af3d5ad
commit 1962d8feb9
2 changed files with 11 additions and 4 deletions

View File

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

View File

@@ -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();
}