Added functions to ActorUtil for converting the extension to a file type and changed various places that had lists of extensions to use ActorUtil instead of duplicating the list of extensions. Added webm and wmv to list of video types.

This commit is contained in:
Kyzentun
2014-11-09 00:04:47 -07:00
parent 77130ed3c4
commit e22e99251e
12 changed files with 208 additions and 130 deletions
+2 -5
View File
@@ -26,6 +26,7 @@
#include "RageLog.h"
#include "RageDisplay.h"
#include "Foreach.h"
#include "ActorUtil.h"
#include <map>
@@ -147,17 +148,13 @@ RageTexture* RageTextureManager::LoadTextureInternal( RageTextureID ID )
}
// The texture is not already loaded. Load it.
RString sExt = GetExtension( ID.filename );
sExt.MakeLower();
RageTexture* pTexture;
if( ID.filename == g_sDefaultTextureName )
{
pTexture = new RageTexture_Default;
}
else if(sExt == "ogv" || sExt == "avi" || sExt == "mpg" ||
sExt == "mpeg" || sExt == "mp4" || sExt == "mkv" || sExt == "mov" ||
sExt == "flv" || sExt == "f4v")
else if(ActorUtil::GetFileType(ID.filename) == FT_Movie)
{
pTexture = RageMovieTexture::Create( ID );
}