From ff478108417560003f77a35f53b57c4031f13589 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Fri, 16 Nov 2012 15:38:43 +0400 Subject: [PATCH] gui/movieplayer.cpp: get return status from filebrowser/moviebrowser --- src/gui/movieplayer.cpp | 14 +++++++++++--- src/gui/movieplayer.h | 1 + 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/gui/movieplayer.cpp b/src/gui/movieplayer.cpp index 6e5446e29..d7e02a6ef 100644 --- a/src/gui/movieplayer.cpp +++ b/src/gui/movieplayer.cpp @@ -223,7 +223,7 @@ int CMoviePlayerGui::exec(CMenuTarget * parent, const std::string & actionKey) timeshift = 0; return menu_return::RETURN_EXIT_ALL; } - return menu_return::RETURN_REPAINT; + return menu_ret; //menu_return::RETURN_REPAINT; } void CMoviePlayerGui::updateLcd() @@ -286,6 +286,7 @@ void CMoviePlayerGui::fillPids() bool CMoviePlayerGui::SelectFile() { bool ret = false; + menu_ret = menu_return::RETURN_REPAINT; /*clear audiopids */ for (int i = 0; i < numpida; i++) { @@ -344,7 +345,8 @@ bool CMoviePlayerGui::SelectFile() ret = true; } - } + } else + menu_ret = moviebrowser->getMenuRet(); } else { // filebrowser if (filebrowser->exec(Path_local.c_str()) == true) { @@ -380,7 +382,8 @@ bool CMoviePlayerGui::SelectFile() } } } - } + } else + menu_ret = filebrowser->getMenuRet(); } if(ret && file_name.empty()) { std::string::size_type pos = full_name.find_last_of('/'); @@ -403,6 +406,7 @@ void CMoviePlayerGui::PlayFile(void) { neutrino_msg_t msg; neutrino_msg_data_t data; + menu_ret = menu_return::RETURN_REPAINT; int position = 0, duration = 0; bool first_start_timeshift = false; @@ -651,6 +655,9 @@ void CMoviePlayerGui::PlayFile(void) msg == NeutrinoMessages::SHUTDOWN || msg == NeutrinoMessages::SLEEPTIMER) { // Exit for Record/Zapto Timers printf("CMoviePlayerGui::PlayFile: ZAPTO etc..\n"); + if(msg != NeutrinoMessages::ZAPTO) + menu_ret = menu_return::RETURN_EXIT_ALL; + playstate = CMoviePlayerGui::STOPPED; g_RCInput->postMsg(msg, data); } else if (msg == CRCInput::RC_timeout) { @@ -661,6 +668,7 @@ void CMoviePlayerGui::PlayFile(void) if (CNeutrinoApp::getInstance()->handleMsg(msg, data) & messages_return::cancel_all) { printf("CMoviePlayerGui::PlayFile: neutrino handleMsg messages_return::cancel_all\n"); playstate = CMoviePlayerGui::STOPPED; + menu_ret = menu_return::RETURN_EXIT_ALL; } else if ( msg <= CRCInput::RC_MaxRC ) { update_lcd = true; diff --git a/src/gui/movieplayer.h b/src/gui/movieplayer.h index 31125f1a1..8217045e8 100644 --- a/src/gui/movieplayer.h +++ b/src/gui/movieplayer.h @@ -94,6 +94,7 @@ class CMoviePlayerGui : public CMenuTarget CFileBrowser * filebrowser; CFileFilter tsfilefilter; std::string Path_local; + int menu_ret; /* playback from bookmark */ CBookmarkManager * bookmarkmanager;