| 
									
										
										
										
											2013-04-17 23:09:55 -04: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 01:47:53 +01:00
										 |  |  | #include <cstddef>
 | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "DiscIO/BannerLoader.h"
 | 
					
						
							|  |  |  | #include "DiscIO/BannerLoaderGC.h"
 | 
					
						
							|  |  |  | #include "DiscIO/BannerLoaderWii.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-21 01:47:53 +01:00
										 |  |  | #include "DiscIO/Filesystem.h"
 | 
					
						
							| 
									
										
										
										
											2014-02-17 05:18:15 -05:00
										 |  |  | #include "DiscIO/VolumeCreator.h"
 | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | namespace DiscIO | 
					
						
							|  |  |  | { | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-02-21 01:47:53 +01: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
										 |  |  | { | 
					
						
							| 
									
										
										
										
											2009-06-07 02:54:07 +00:00
										 |  |  | 	if (IsVolumeWiiDisc(pVolume) || IsVolumeWadFile(pVolume)) | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2010-06-03 20:37:32 +00:00
										 |  |  | 		return new CBannerLoaderWii(pVolume); | 
					
						
							|  |  |  | 	} | 
					
						
							| 
									
										
										
										
											2013-03-02 22:57:49 -06:00
										 |  |  | 	if (_rFileSystem.IsValid()) | 
					
						
							| 
									
										
										
										
											2010-06-03 20:37:32 +00:00
										 |  |  | 	{ | 
					
						
							| 
									
										
										
										
											2013-03-02 22:57:49 -06:00
										 |  |  | 		return new CBannerLoaderGC(_rFileSystem, pVolume); | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | 	} | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-03-09 21:14:26 +01:00
										 |  |  | 	return nullptr; | 
					
						
							| 
									
										
										
										
											2008-12-08 05:30:24 +00:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2010-06-03 20:37:32 +00:00
										 |  |  | } // namespace
 |