Play-/Source/Js_DiscImageDeviceStream.h
Jean-Philip Desjardins 7b5b24c4cf Improve the way disc images are accessed.
Instead of loading the whole disc image in memory, use the Browser's File API to fetch needed parts of the file.
Has to go through some odd proxying hoops since the File object is owned by the main browser thread.
2022-02-14 13:07:15 -05:00

19 lines
408 B
C++

#pragma once
#include "Stream.h"
class CJsDiscImageDeviceStream : public Framework::CStream
{
public:
virtual ~CJsDiscImageDeviceStream() = default;
void Seek(int64, Framework::STREAM_SEEK_DIRECTION) override;
uint64 Tell() override;
uint64 Read(void*, uint64) override;
uint64 Write(const void*, uint64) override;
bool IsEOF() override;
void Flush() override;
private:
uint64 m_position = 0;
};