summaryrefslogtreecommitdiff
path: root/coreengine/animation.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2016-03-22 16:55:46 +0100
committerlouis <louis.braun@gmx.de>2016-03-22 16:55:46 +0100
commit65b5d74b7af6d2ee85b193a64f87ba057f02b1f0 (patch)
treed5ea3c32b59b157a94074783502015ad2fdd6bfe /coreengine/animation.c
parent842fc1a254ec13a5de2c2bd47fa20e4bd9746ab6 (diff)
downloadvdr-plugin-skindesigner-65b5d74b7af6d2ee85b193a64f87ba057f02b1f0.tar.gz
vdr-plugin-skindesigner-65b5d74b7af6d2ee85b193a64f87ba057f02b1f0.tar.bz2
fixed bug that onpause view potentially starts during setting cutting marks
Diffstat (limited to 'coreengine/animation.c')
-rw-r--r--coreengine/animation.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/coreengine/animation.c b/coreengine/animation.c
index 863527c..735d309 100644
--- a/coreengine/animation.c
+++ b/coreengine/animation.c
@@ -11,6 +11,7 @@ cAnimation::cAnimation(cScrollable *scrollable) : cThread("scroller") {
this->shiftable = NULL;
this->blinkable = NULL;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = false;
blinkFunc = -1;
@@ -23,6 +24,7 @@ cAnimation::cAnimation(cDetachable *detachable, bool wait, bool animation) : cTh
this->shiftable = NULL;
this->blinkable = NULL;
waitOnWakeup = wait;
+ keepSleeping = false;
doAnimation = animation;
modeIn = false;
blinkFunc = -1;
@@ -35,6 +37,7 @@ cAnimation::cAnimation(cFadable *fadable, bool fadein) : cThread("fadable") {
this->shiftable = NULL;
this->blinkable = NULL;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = fadein;
blinkFunc = -1;
@@ -47,6 +50,7 @@ cAnimation::cAnimation(cShiftable *shiftable, cPoint &start, cPoint &end, bool s
this->shiftable = shiftable;
this->blinkable = NULL;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = shiftin;
shiftstart = start;
@@ -61,6 +65,7 @@ cAnimation::cAnimation(cBlinkable *blinkable, int func) : cThread("blinking") {
this->shiftable = NULL;
this->blinkable = blinkable;
waitOnWakeup = false;
+ keepSleeping = false;
doAnimation = true;
modeIn = false;
blinkFunc = func;
@@ -75,6 +80,11 @@ void cAnimation::WakeUp(void) {
sleepWait.Signal();
}
+void cAnimation::ResetSleep(void) {
+ keepSleeping = true;
+ sleepWait.Signal();
+}
+
void cAnimation::Stop(bool deletePixmaps) {
sleepWait.Signal();
Cancel(2);
@@ -100,7 +110,10 @@ void cAnimation::Sleep(int duration) {
//sleep should wake up itself, so no infinit wait allowed
if (duration <= 0)
return;
- sleepWait.Wait(duration);
+ do {
+ keepSleeping = false;
+ sleepWait.Wait(duration);
+ } while (keepSleeping);
}
void cAnimation::Wait(void) {