2013-04-17 21:09:55 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 22:30:24 -07:00
|
|
|
|
|
|
|
#include "BannerLoader.h"
|
|
|
|
#include "BannerLoaderWii.h"
|
|
|
|
#include "BannerLoaderGC.h"
|
|
|
|
|
|
|
|
#include "VolumeCreator.h"
|
|
|
|
#include "FileUtil.h"
|
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
|
2009-06-06 20:54:07 -06:00
|
|
|
IBannerLoader* CreateBannerLoader(DiscIO::IFileSystem& _rFileSystem, DiscIO::IVolume *pVolume)
|
2008-12-07 22:30:24 -07:00
|
|
|
{
|
2009-06-06 20:54:07 -06:00
|
|
|
if (IsVolumeWiiDisc(pVolume) || IsVolumeWadFile(pVolume))
|
2008-12-07 22:30:24 -07:00
|
|
|
{
|
2010-06-03 14:37:32 -06:00
|
|
|
return new CBannerLoaderWii(pVolume);
|
|
|
|
}
|
2013-03-02 21:57:49 -07:00
|
|
|
if (_rFileSystem.IsValid())
|
2010-06-03 14:37:32 -06:00
|
|
|
{
|
2013-03-02 21:57:49 -07:00
|
|
|
return new CBannerLoaderGC(_rFileSystem, pVolume);
|
2008-12-07 22:30:24 -07:00
|
|
|
}
|
|
|
|
|
2010-06-03 14:37:32 -06:00
|
|
|
return NULL;
|
2008-12-07 22:30:24 -07:00
|
|
|
}
|
|
|
|
|
2010-06-03 14:37:32 -06:00
|
|
|
} // namespace
|