mirror of
https://github.com/libretro/parallel-gx1.git
synced 2026-11-07 04:26:01 -10:00
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.
42 lines
888 B
C++
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
|