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