Skip to content
Permalink
Browse files

Skip videos instantly

  • Loading branch information...
SupSuper committed Aug 2, 2019
1 parent 4361c72 commit e08f6b3c0721f66901233f9ed37bdc0cf6a52936
Showing with 12 additions and 8 deletions.
  1. +6 −3 src/Engine/FlcPlayer.cpp
  2. +6 −5 src/Menu/VideoState.cpp
@@ -180,10 +180,13 @@ void FlcPlayer::deInit()
_mainScreen = 0;
}

delete[] _fileBuf;
_fileBuf = 0;
if (_fileBuf != 0)
{
delete[] _fileBuf;
_fileBuf = 0;

deInitAudio();
deInitAudio();
}
}

/**
@@ -425,6 +425,11 @@ void VideoState::init()
int dx = (Options::baseXResolution - Screen::ORIGINAL_WIDTH) / 2;
int dy = (Options::baseYResolution - Screen::ORIGINAL_HEIGHT) / 2;

// We can only do a fade out in 8bpp, otherwise instantly end it
bool fade = (_game->getScreen()->getSurface()->getSurface()->format->BitsPerPixel == 8);
const int FADE_DELAY = 45;
const int FADE_STEPS = 20;

FlcPlayer *flcPlayer = NULL;
size_t audioCounter = 0;
for (std::vector<std::string>::const_iterator it = _videos->begin(); it != _videos->end(); ++it)
@@ -467,6 +472,7 @@ void VideoState::init()

if (flcPlayer->wasSkipped())
{
fade = false;
break;
}
}
@@ -476,11 +482,6 @@ void VideoState::init()
delete flcPlayer;
}

// We can only do a fade out in 8bpp, otherwise instantly end it
bool fade = (_game->getScreen()->getSurface()->getSurface()->format->BitsPerPixel == 8);
const int FADE_DELAY = 45;
const int FADE_STEPS = 20;

#ifndef __NO_MUSIC
// fade out!
if (fade)

0 comments on commit e08f6b3

Please sign in to comment.
You can’t perform that action at this time.