Don't create new IOFiles when creating a blob

...except for WBFS, which is special because
it has the ability to open multiple files.
This commit is contained in:
JosJuice
2016-12-21 12:50:15 +01:00
parent d1ea00ed88
commit 8d54bbc528
10 changed files with 93 additions and 80 deletions

View File

@ -34,7 +34,7 @@ struct CISOHeader
class CISOFileReader : public IBlobReader
{
public:
static std::unique_ptr<CISOFileReader> Create(const std::string& filename);
static std::unique_ptr<CISOFileReader> Create(File::IOFile file);
BlobType GetBlobType() const override { return BlobType::CISO; }
// The CISO format does not save the original file size.
@ -45,7 +45,7 @@ public:
bool Read(u64 offset, u64 nbytes, u8* out_ptr) override;
private:
CISOFileReader(std::FILE* file);
CISOFileReader(File::IOFile file);
typedef u16 MapType;
static const MapType UNUSED_BLOCK_ID = -1;