mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
Fixed a bug in timeshift mode that prevented the progress bar from updating in pause mode
This commit is contained in:
parent
6972a59e1b
commit
c3f7a2cfdf
@ -142,6 +142,7 @@ void cViewReplay::PreCache(void) {
|
||||
|
||||
void cViewReplay::ClearVariables(void) {
|
||||
cView::ClearVariables();
|
||||
recording = NULL;
|
||||
modeOnly = false;
|
||||
lastFlush = 0;
|
||||
lastFlushModeOnly = 0;
|
||||
@ -171,6 +172,7 @@ void cViewReplay::SetTimeShift(int framesTotal, int timeShiftLength) {
|
||||
}
|
||||
|
||||
void cViewReplay::SetRecording(const cRecording *recording) {
|
||||
this->recording = recording;
|
||||
if (veRecTitle) {
|
||||
veRecTitle->Set(recording);
|
||||
}
|
||||
@ -180,6 +182,7 @@ void cViewReplay::SetRecording(const cRecording *recording) {
|
||||
if (veScraperContent) {
|
||||
veScraperContent->Set(recording);
|
||||
}
|
||||
SetTimeShiftValues();
|
||||
}
|
||||
|
||||
void cViewReplay::GetGlobalTimers(void) {
|
||||
@ -189,7 +192,7 @@ void cViewReplay::GetGlobalTimers(void) {
|
||||
}
|
||||
}
|
||||
|
||||
void cViewReplay::SetTimeShiftValues(const cRecording *recording) {
|
||||
void cViewReplay::SetTimeShiftValues(void) {
|
||||
if (!recording)
|
||||
return;
|
||||
bool isTimeShift = false;
|
||||
@ -220,6 +223,7 @@ void cViewReplay::SetTimeShiftValues(const cRecording *recording) {
|
||||
}
|
||||
|
||||
void cViewReplay::SetTitle(const char *title) {
|
||||
recording = NULL;
|
||||
if (veRecTitle) {
|
||||
veRecTitle->Set(title);
|
||||
}
|
||||
@ -259,6 +263,7 @@ void cViewReplay::SetEndTime(int current, int total) {
|
||||
}
|
||||
|
||||
void cViewReplay::SetProgressbar(int current, int total) {
|
||||
SetTimeShiftValues();
|
||||
if (veProgressbar)
|
||||
veProgressbar->Set(current, total, timeShiftActive, timeShiftFramesTotal);
|
||||
Render((int)eVeDisplayReplay::progressbar);
|
||||
|
@ -21,6 +21,7 @@ private:
|
||||
cVeDrJump *veJump;
|
||||
cVeDrOnPause *veOnPause;
|
||||
cVeDrOnPause *veOnPauseModeOnly;
|
||||
const cRecording *recording;
|
||||
bool modeOnly;
|
||||
time_t lastFlush;
|
||||
time_t lastFlushModeOnly;
|
||||
@ -33,6 +34,7 @@ private:
|
||||
bool timersLoaded;
|
||||
cGlobalTimers globalTimers;
|
||||
void GetGlobalTimers(void);
|
||||
void SetTimeShiftValues(void);
|
||||
void SetViewElements(void);
|
||||
void ClearVariables(void);
|
||||
void SetViewElementObjects(void);
|
||||
@ -46,7 +48,6 @@ public:
|
||||
void SetTimeShift(int framesTotal, int timeShiftLength);
|
||||
void SetRecording(const cRecording *recording);
|
||||
void SetTitle(const char *title);
|
||||
void SetTimeShiftValues(const cRecording *recording);
|
||||
void SetCurrent(const char *current);
|
||||
void SetTotal(const char *total);
|
||||
void SetEndTime(int current, int total);
|
||||
|
@ -273,7 +273,7 @@ void cVeDrProgressBar::SetTokenContainer(void) {
|
||||
}
|
||||
|
||||
void cVeDrProgressBar::Set(int current, int total, bool timeshiftActive, int timeshiftTotal) {
|
||||
if (this->current == current)
|
||||
if (!(this->current != current || this->total != total))
|
||||
return;
|
||||
this->current = current;
|
||||
this->total = total;
|
||||
@ -595,7 +595,7 @@ void cVeDrProgressModeonly::SetTokenContainer(void) {
|
||||
}
|
||||
|
||||
void cVeDrProgressModeonly::Set(double fps, int current, int total) {
|
||||
if (this->current == current)
|
||||
if (!(this->current != current || this->total != total))
|
||||
return;
|
||||
this->fps = fps;
|
||||
this->current = current;
|
||||
|
@ -18,7 +18,6 @@ void cSDDisplayReplay::SetRecording(const cRecording *Recording) {
|
||||
view->SetRecording(Recording);
|
||||
if (init) {
|
||||
view->SetRecordingLength(Recording->LengthInSeconds());
|
||||
view->SetTimeShiftValues(Recording);
|
||||
init = false;
|
||||
}
|
||||
}
|
||||
@ -30,7 +29,6 @@ void cSDDisplayReplay::SetTitle(const char *Title) {
|
||||
view->SetTitle(Title);
|
||||
if (init) {
|
||||
view->SetRecordingLength(0);
|
||||
view->SetTimeShiftValues(NULL);
|
||||
init = false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user