aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/lab/readdiff.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/engines/lab/readdiff.cpp b/engines/lab/readdiff.cpp
index 926ef359f9..bfe574a378 100644
--- a/engines/lab/readdiff.cpp
+++ b/engines/lab/readdiff.cpp
@@ -36,6 +36,8 @@
namespace Lab {
static bool PlayOnce = false;
+static bool StopPlayingEnd = false;
+
static uint32 header, size, WaitSec = 0L, WaitMicros = 0L, DelayMicros = 0L;
static uint16 CurBit = 0, framenumber = 0, samplespeed, numchunks = 1;
static byte *Buffer, temp[5];
@@ -249,7 +251,7 @@ void LabEngine::diffNextFrame() {
break;
}
case 65535L:
- if ((framenumber == 1) || PlayOnce) {
+ if ((framenumber == 1) || PlayOnce || StopPlayingEnd) {
int didTOF = 0;
if (waitForEffect) {
@@ -294,6 +296,7 @@ void playDiff() {
framenumber = 0;
numchunks = 1;
donepal = false;
+ StopPlayingEnd = false;
difffile = &storagefordifffile;
IsPlaying = true;
@@ -385,13 +388,12 @@ void stopDiff() {
}
}
-
-
/*****************************************************************************/
/* Stops an animation from running. */
/*****************************************************************************/
void stopDiffEnd() {
if (IsPlaying) {
+ StopPlayingEnd = true;
while (IsPlaying) {
g_lab->_music->updateMusic();
g_lab->diffNextFrame();