gui/infoviewer.cpp: update movieplayer position also in timeshift mode;

fix messages in timeshift mode: while infobar is visible, all but key events was dropped,
preventing ie record timer stop etc.
This commit is contained in:
[CST] Focus
2014-01-29 17:26:45 +04:00
parent a763a9ab06
commit 5135e30773

View File

@@ -924,7 +924,8 @@ void CInfoViewer::loop(bool show_dot)
res = messages_return::cancel_info;
}
}
} else if (fileplay && !CMoviePlayerGui::getInstance().timeshift /* && ( (msg == (neutrino_msg_t) g_settings.mpkey_pause) || (msg == (neutrino_msg_t) g_settings.mpkey_rewind) || (msg == (neutrino_msg_t) g_settings.mpkey_play) || (msg == (neutrino_msg_t) g_settings.mpkey_forward) || (msg == (neutrino_msg_t) g_settings.mpkey_stop)) */ ) {
} else if (fileplay || CMoviePlayerGui::getInstance().timeshift) {
/* this debug message will only hit in movieplayer mode, where console is
* spammed to death anyway... */
printf("%s:%d msg:%08lx, data: %08lx\n", __func__, __LINE__, (long)msg, (long)data);
@@ -942,6 +943,7 @@ void CInfoViewer::loop(bool show_dot)
CMoviePlayerGui::getInstance().start_timeshift = false;
}
#endif
#if 0
else if (CMoviePlayerGui::getInstance().timeshift && ((msg == (neutrino_msg_t) g_settings.mpkey_rewind) || \
(msg == (neutrino_msg_t) g_settings.mpkey_forward) || \
(msg == (neutrino_msg_t) g_settings.mpkey_pause) || \
@@ -952,6 +954,7 @@ void CInfoViewer::loop(bool show_dot)
g_RCInput->postMsg (msg, data);
res = messages_return::cancel_info;
}
#endif
}
if (hideIt) {
@@ -1274,8 +1277,9 @@ int CInfoViewer::handleMsg (const neutrino_msg_t msg, neutrino_msg_data_t data)
} else if (data == lcdUpdateTimer) {
//printf("CInfoViewer::handleMsg: lcdUpdateTimer\n");
if (is_visible) {
if (fileplay) {
if (fileplay || CMoviePlayerGui::getInstance().timeshift)
CMoviePlayerGui::getInstance().UpdatePosition();
if (fileplay) {
char runningRest[32]; // %d can be 10 digits max...
int curr_pos = CMoviePlayerGui::getInstance().GetPosition();
int duration = CMoviePlayerGui::getInstance().GetDuration();