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