Files
parallel-gx1/Source/Core/DiscIO/FileBlob.cpp
T
LibretroAdmin 8c7aa58f6b Remove UPnP, the unused host input backends, disc conversion and DolphinTool
None of these run in the core: UPnP served NetPlay; the DInput, XInput,
WGInput, Win32, Quartz, Xlib, evdev and Pipes input backends are never
enabled, since input comes from libretro; and disc conversion, with its
multithreaded compressor, was only reached from DolphinTool. The WIA,
RVZ and GCZ readers stay.
2026-11-05 13:00:29 +01:00

42 lines
888 B
C++

// Copyright 2008 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include "DiscIO/FileBlob.h"
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include <vector>
#include "Common/Assert.h"
#include "Common/FileUtil.h"
#include "Common/MsgHandler.h"
namespace DiscIO
{
PlainFileReader::PlainFileReader(File::DirectIOFile file) : m_file(std::move(file))
{
m_size = m_file.GetSize();
}
std::unique_ptr<PlainFileReader> PlainFileReader::Create(File::DirectIOFile file)
{
if (file.IsOpen())
return std::unique_ptr<PlainFileReader>(new PlainFileReader(std::move(file)));
return nullptr;
}
std::unique_ptr<BlobReader> PlainFileReader::CopyReader() const
{
return Create(m_file);
}
bool PlainFileReader::Read(u64 offset, u64 nbytes, u8* out_ptr)
{
return m_file.OffsetRead(offset, out_ptr, nbytes);
}
} // namespace DiscIO