mirror of
https://projects.vdr-developer.org/git/vdr-plugin-skindesigner.git
synced 2023-10-19 17:58:31 +02:00
fixed bug that onpause view potentially starts during setting cutting marks
This commit is contained in:
parent
48afaeed63
commit
cacde1887c
3
HISTORY
3
HISTORY
@ -172,3 +172,6 @@ Version 0.1.5
|
|||||||
additional skin caching at startup
|
additional skin caching at startup
|
||||||
|
|
||||||
Version 0.1.6
|
Version 0.1.6
|
||||||
|
|
||||||
|
- fixed bug that onpause view potentially starts during setting cutting
|
||||||
|
marks
|
||||||
|
@ -16,7 +16,6 @@ cSDDisplayReplay::cSDDisplayReplay(cTemplate *replayTemplate, bool ModeOnly) {
|
|||||||
doOutput = false;
|
doOutput = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
replayView->DrawBackground(modeOnly);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cSDDisplayReplay::~cSDDisplayReplay() {
|
cSDDisplayReplay::~cSDDisplayReplay() {
|
||||||
@ -46,6 +45,7 @@ void cSDDisplayReplay::SetMode(bool Play, bool Forward, int Speed) {
|
|||||||
void cSDDisplayReplay::SetProgress(int Current, int Total) {
|
void cSDDisplayReplay::SetProgress(int Current, int Total) {
|
||||||
if (!doOutput)
|
if (!doOutput)
|
||||||
return;
|
return;
|
||||||
|
replayView->DelayOnPause();
|
||||||
replayView->DrawProgressBar(Current, Total);
|
replayView->DrawProgressBar(Current, Total);
|
||||||
replayView->DrawMarks(marks, Current, Total);
|
replayView->DrawMarks(marks, Current, Total);
|
||||||
}
|
}
|
||||||
@ -83,6 +83,7 @@ void cSDDisplayReplay::Flush(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (initial) {
|
if (initial) {
|
||||||
|
replayView->DrawBackground(modeOnly);
|
||||||
replayView->DrawCustomTokens();
|
replayView->DrawCustomTokens();
|
||||||
replayView->DoFadeIn();
|
replayView->DoFadeIn();
|
||||||
initial = false;
|
initial = false;
|
||||||
|
@ -6,6 +6,7 @@ cDisplayReplayOnPauseView::cDisplayReplayOnPauseView(cTemplateViewElement *tmplV
|
|||||||
tmplViewElement->SetPixOffset(0);
|
tmplViewElement->SetPixOffset(0);
|
||||||
delay = tmplViewElement->GetNumericParameter(ptDelay) * 1000;
|
delay = tmplViewElement->GetNumericParameter(ptDelay) * 1000;
|
||||||
SetFadeTime(tmplViewElement->GetNumericParameter(ptFadeTime));
|
SetFadeTime(tmplViewElement->GetNumericParameter(ptFadeTime));
|
||||||
|
resetSleep = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cDisplayReplayOnPauseView::~cDisplayReplayOnPauseView() {
|
cDisplayReplayOnPauseView::~cDisplayReplayOnPauseView() {
|
||||||
@ -83,7 +84,20 @@ void cDisplayReplayOnPauseView::Render(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cDisplayReplayOnPauseView::Action(void) {
|
void cDisplayReplayOnPauseView::Action(void) {
|
||||||
DoSleep(delay);
|
bool doContinue;
|
||||||
|
int sleepSlice = 10;
|
||||||
|
do {
|
||||||
|
doContinue = false;
|
||||||
|
for (int i = 0; Running() && (i*sleepSlice < delay); i++) {
|
||||||
|
cCondWait::SleepMs(sleepSlice);
|
||||||
|
if (resetSleep) {
|
||||||
|
doContinue = true;
|
||||||
|
resetSleep = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} while (doContinue);
|
||||||
|
|
||||||
if (!Running())
|
if (!Running())
|
||||||
return;
|
return;
|
||||||
Render();
|
Render();
|
||||||
|
@ -8,10 +8,12 @@
|
|||||||
class cDisplayReplayOnPauseView : public cView, public cViewHelpers {
|
class cDisplayReplayOnPauseView : public cView, public cViewHelpers {
|
||||||
private:
|
private:
|
||||||
int delay;
|
int delay;
|
||||||
|
bool resetSleep;
|
||||||
virtual void Action(void);
|
virtual void Action(void);
|
||||||
public:
|
public:
|
||||||
cDisplayReplayOnPauseView(cTemplateViewElement *tmplViewElement);
|
cDisplayReplayOnPauseView(cTemplateViewElement *tmplViewElement);
|
||||||
virtual ~cDisplayReplayOnPauseView();
|
virtual ~cDisplayReplayOnPauseView();
|
||||||
|
void ResetSleep(void) { resetSleep = true; };
|
||||||
void Render(void);
|
void Render(void);
|
||||||
void Flush(void) { DoFlush(); };
|
void Flush(void) { DoFlush(); };
|
||||||
};
|
};
|
||||||
|
@ -379,6 +379,12 @@ void cDisplayReplayView::ClearOnPause(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void cDisplayReplayView::DelayOnPause(void) {
|
||||||
|
if (onPauseView) {
|
||||||
|
onPauseView->ResetSleep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void cDisplayReplayView::DrawCustomTokens(void) {
|
void cDisplayReplayView::DrawCustomTokens(void) {
|
||||||
if (!ViewElementImplemented(veCustomTokens)) {
|
if (!ViewElementImplemented(veCustomTokens)) {
|
||||||
return;
|
return;
|
||||||
|
@ -33,6 +33,7 @@ public:
|
|||||||
void DrawMessage(eMessageType type, const char *text);
|
void DrawMessage(eMessageType type, const char *text);
|
||||||
void DrawOnPause(bool modeOnly);
|
void DrawOnPause(bool modeOnly);
|
||||||
void ClearOnPause(void);
|
void ClearOnPause(void);
|
||||||
|
void DelayOnPause(void);
|
||||||
void DrawCustomTokens(void);
|
void DrawCustomTokens(void);
|
||||||
void DoFadeIn(void) { Start(); };
|
void DoFadeIn(void) { Start(); };
|
||||||
void Flush(void) { DoFlush(); };
|
void Flush(void) { DoFlush(); };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user