From 4aee1ed738fe1132f0184fd886b3ee83ecda476b Mon Sep 17 00:00:00 2001 From: "Devin J. Pohly" Date: Sun, 2 Jun 2013 03:41:33 -0400 Subject: [PATCH] Allow more movie types for bgchanges --- src/ActorUtil.cpp | 7 ++++++- src/BackgroundUtil.cpp | 5 +++++ src/RageTextureManager.cpp | 2 +- src/Song.cpp | 6 ++++++ 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/ActorUtil.cpp b/src/ActorUtil.cpp index d7068672ab..4892483342 100644 --- a/src/ActorUtil.cpp +++ b/src/ActorUtil.cpp @@ -400,7 +400,12 @@ FileType ActorUtil::GetFileType( const RString &sPath ) else if( sExt=="ogv" || sExt=="avi" || - sExt=="mpeg" || + sExt=="mpeg" || + sExt=="mp4" || + sExt=="mkv" || + sExt=="mov" || + sExt=="flv" || + sExt=="f4v" || sExt=="mpg" ) return FT_Movie; else if( sExt=="txt" ) return FT_Model; diff --git a/src/BackgroundUtil.cpp b/src/BackgroundUtil.cpp index 67565824c5..b7380739bc 100644 --- a/src/BackgroundUtil.cpp +++ b/src/BackgroundUtil.cpp @@ -198,6 +198,11 @@ void BackgroundUtil::GetSongMovies( const Song *pSong, const RString &sMatch, ve GetDirListing( pSong->GetSongDir()+sMatch+"*.avi", vsPathsOut, false, true ); GetDirListing( pSong->GetSongDir()+sMatch+"*.mpg", vsPathsOut, false, true ); GetDirListing( pSong->GetSongDir()+sMatch+"*.mpeg", vsPathsOut, false, true ); + GetDirListing( pSong->GetSongDir()+sMatch+"*.mp4", vsPathsOut, false, true ); + GetDirListing( pSong->GetSongDir()+sMatch+"*.flv", vsPathsOut, false, true ); + GetDirListing( pSong->GetSongDir()+sMatch+"*.f4v", vsPathsOut, false, true ); + GetDirListing( pSong->GetSongDir()+sMatch+"*.mov", vsPathsOut, false, true ); + GetDirListing( pSong->GetSongDir()+sMatch+"*.mkv", vsPathsOut, false, true ); } else { diff --git a/src/RageTextureManager.cpp b/src/RageTextureManager.cpp index 8062cabe2e..4d6d959513 100644 --- a/src/RageTextureManager.cpp +++ b/src/RageTextureManager.cpp @@ -142,7 +142,7 @@ RageTexture* RageTextureManager::LoadTextureInternal( RageTextureID ID ) RageTexture* pTexture; if( ID.filename == g_sDefaultTextureName ) pTexture = new RageTexture_Default; - else if( sExt == "ogv" || sExt == "avi" || sExt == "mpg" || sExt == "mpeg" ) + else if( sExt == "ogv" || sExt == "avi" || sExt == "mpg" || sExt == "mpeg" || sExt == "mp4" || sExt == "mkv" || sExt == "mov" || sExt == "flv" || sExt == "f4v") pTexture = RageMovieTexture::Create( ID ); else pTexture = new RageBitmapTexture( ID ); diff --git a/src/Song.cpp b/src/Song.cpp index 46dd40c2a9..ceb30aae4e 100644 --- a/src/Song.cpp +++ b/src/Song.cpp @@ -822,6 +822,12 @@ void Song::TidyUpData( bool fromCache, bool /* duringCache */ ) GetDirListing( m_sSongDir + RString("*.avi"), arrayPossibleMovies ); GetDirListing( m_sSongDir + RString("*.mpg"), arrayPossibleMovies ); GetDirListing( m_sSongDir + RString("*.mpeg"), arrayPossibleMovies ); + GetDirListing( m_sSongDir + RString("*.mp4"), arrayPossibleMovies ); + GetDirListing( m_sSongDir + RString("*.mkv"), arrayPossibleMovies ); + GetDirListing( m_sSongDir + RString("*.flv"), arrayPossibleMovies ); + GetDirListing( m_sSongDir + RString("*.f4v"), arrayPossibleMovies ); + GetDirListing( m_sSongDir + RString("*.mov"), arrayPossibleMovies ); + /* Use this->GetBeatFromElapsedTime(0) instead of 0 to start when the * music starts. */ if( arrayPossibleMovies.size() == 1 )