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
|
|
|
|
2014-02-20 17:47:53 -07:00
|
|
|
#include <cstddef>
|
2008-12-07 22:30:24 -07:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DiscIO/BannerLoader.h"
|
|
|
|
#include "DiscIO/BannerLoaderGC.h"
|
|
|
|
#include "DiscIO/BannerLoaderWii.h"
|
2014-02-20 17:47:53 -07:00
|
|
|
#include "DiscIO/Filesystem.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DiscIO/VolumeCreator.h"
|
2008-12-07 22:30:24 -07:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
|
|
|
|
2014-02-20 17:47:53 -07:00
|
|
|
class IBannerLoader;
|
|
|
|
class IVolume;
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2014-03-09 14:14:26 -06:00
|
|
|
return nullptr;
|
2008-12-07 22:30:24 -07:00
|
|
|
}
|
|
|
|
|
2010-06-03 14:37:32 -06:00
|
|
|
} // namespace
|