Changed file testing for .bik videos to support fs_game. fixes #100

This commit is contained in:
Robert Beckebans 2014-05-14 23:14:37 +02:00
parent ee09662c10
commit 837cb4dff2

View file

@ -470,7 +470,34 @@ bool idCinematicLocal::InitFromFFMPEGFile( const char* qpath, bool amilooping )
isRoQ = false;
CIN_HEIGHT = DEFAULT_CIN_HEIGHT;
CIN_WIDTH = DEFAULT_CIN_WIDTH;
idStr fullpath = fileSystem->RelativePathToOSPath( qpath, "fs_basepath" );
idStr fullpath;
idFile* testFile = fileSystem->OpenFileRead( qpath );
if( testFile )
{
fullpath = testFile->GetFullPath();
fileSystem->CloseFile( testFile );
}
// RB: case sensitivity HACK for Linux
else if( idStr::Cmpn( qpath, "sound/vo", 8 ) == 0 )
{
idStr newPath( qpath );
newPath.Replace( "sound/vo", "sound/VO" );
testFile = fileSystem->OpenFileRead( qpath );
if( testFile )
{
fullpath = testFile->GetFullPath();
fileSystem->CloseFile( testFile );
}
else
{
common->Warning( "idCinematic: Cannot open FFMPEG video file: '%s', %d\n", qpath, looping );
return false;
}
}
//idStr fullpath = fileSystem->RelativePathToOSPath( qpath, "fs_basepath" );
if( ( ret = avformat_open_input( &fmt_ctx, fullpath, NULL, NULL ) ) < 0 )
{