aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sci/graphics/video32.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/engines/sci/graphics/video32.cpp b/engines/sci/graphics/video32.cpp
index 736ee15428..e837cecb49 100644
--- a/engines/sci/graphics/video32.cpp
+++ b/engines/sci/graphics/video32.cpp
@@ -599,20 +599,26 @@ VMDPlayer::IOStatus VMDPlayer::close() {
return kIOSuccess;
}
- if (_isComposited) {
- closeComposited();
- } else {
- closeOverlay();
- }
+ if (_isInitialized) {
+ if (_isComposited) {
+ closeComposited();
+ } else {
+ closeOverlay();
+ }
- if (_blackoutPlane != nullptr) {
- g_sci->_gfxFrameout->deletePlane(*_blackoutPlane);
- _blackoutPlane = nullptr;
- }
+ if (_blackoutPlane != nullptr) {
+ g_sci->_gfxFrameout->deletePlane(*_blackoutPlane);
+ _blackoutPlane = nullptr;
+ }
- if (!_leaveLastFrame && !_leaveScreenBlack) {
- // This call *actually* deletes the blackout plane
- g_sci->_gfxFrameout->frameOut(true);
+ if (!_leaveLastFrame && !_leaveScreenBlack) {
+ // This call *actually* deletes the blackout plane
+ g_sci->_gfxFrameout->frameOut(true);
+ }
+
+ if (!_showCursor) {
+ g_sci->_gfxCursor32->unhide();
+ }
}
_decoder->close();
@@ -622,10 +628,6 @@ VMDPlayer::IOStatus VMDPlayer::close() {
_bundledVmd = nullptr;
}
- if (!_showCursor) {
- g_sci->_gfxCursor32->unhide();
- }
-
_isOpen = false;
_isInitialized = false;
_ignorePalettes = false;