From e9411db235d92b27ac4df1a12d877d61c1b45849 Mon Sep 17 00:00:00 2001 From: "[CST] Focus" Date: Tue, 26 Mar 2013 18:46:09 +0400 Subject: [PATCH] gui/infoviewer.cpp: update progress in file play mode while visible Origin commit data ------------------ Branch: ni/coolstream Commit: https://github.com/neutrino-images/ni-neutrino/commit/60cfc785cd77b98a407bfa7cfc443efd328ac74d Author: [CST] Focus Date: 2013-03-26 (Tue, 26 Mar 2013) ------------------ No further description and justification available within origin commit message! ------------------ This commit was generated by Migit --- src/gui/infoviewer.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/gui/infoviewer.cpp b/src/gui/infoviewer.cpp index 6f661fae9..2c1c02dcb 100644 --- a/src/gui/infoviewer.cpp +++ b/src/gui/infoviewer.cpp @@ -1244,8 +1244,18 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data) return messages_return::handled; } else if (data == lcdUpdateTimer) { //printf("CInfoViewer::handleMsg: lcdUpdateTimer\n"); - if ( is_visible ) - show_Data( true ); + if (is_visible) { + if (fileplay) { + CMoviePlayerGui::getInstance().UpdatePosition(); + char runningRest[32]; // %d can be 10 digits max... + int curr_pos = CMoviePlayerGui::getInstance().GetPosition(); + int duration = CMoviePlayerGui::getInstance().GetDuration(); + sprintf(runningRest, "%d / %d min", (curr_pos + 30000) / 60000, (duration + 30000) / 60000); + display_Info(NULL, NULL, true, false, CMoviePlayerGui::getInstance().file_prozent, NULL, runningRest); + } else { + show_Data( true ); + } + } showLcdPercentOver (); return messages_return::handled; } else if (data == sec_timer_id) {