mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-11 08:58:16 +02:00
![JosJuice](/assets/img/avatar_default.png)
GC/Wii filesystem internals shouldn't be exposed to other classes. This change isn't especially useful by itself, but it opens up the way for some neat stuff in the following commits.
42 lines
798 B
C++
42 lines
798 B
C++
// Copyright 2008 Dolphin Emulator Project
|
|
// Licensed under GPLv2+
|
|
// Refer to the license.txt file included.
|
|
|
|
#include "DiscIO/Filesystem.h"
|
|
#include <memory>
|
|
#include "DiscIO/FileSystemGCWii.h"
|
|
#include "DiscIO/Volume.h"
|
|
|
|
namespace DiscIO
|
|
{
|
|
FileInfo::~FileInfo()
|
|
{
|
|
}
|
|
|
|
FileSystem::FileSystem(const Volume* _rVolume, const Partition& partition)
|
|
: m_rVolume(_rVolume), m_partition(partition)
|
|
{
|
|
}
|
|
|
|
FileSystem::~FileSystem()
|
|
{
|
|
}
|
|
|
|
std::unique_ptr<FileSystem> CreateFileSystem(const Volume* volume, const Partition& partition)
|
|
{
|
|
if (!volume)
|
|
return nullptr;
|
|
|
|
std::unique_ptr<FileSystem> filesystem = std::make_unique<FileSystemGCWii>(volume, partition);
|
|
|
|
if (!filesystem)
|
|
return nullptr;
|
|
|
|
if (!filesystem->IsValid())
|
|
filesystem.reset();
|
|
|
|
return filesystem;
|
|
}
|
|
|
|
} // namespace
|