This commit is contained in:
twinaphex 2017-12-18 22:55:27 +01:00
parent 241b9ffbb1
commit a2e8cf2403
5 changed files with 0 additions and 38 deletions

View File

@ -27,7 +27,6 @@
FileStream::FileStream(const char *path, const int mode)
{
OpenedMode = mode;
fp = filestream_open(path, (mode == MODE_WRITE) ? RETRO_VFS_FILE_ACCESS_WRITE : RETRO_VFS_FILE_ACCESS_READ, RETRO_VFS_FILE_ACCESS_HINT_NONE);
}
@ -35,24 +34,6 @@ FileStream::~FileStream()
{
}
uint64_t FileStream::attributes(void)
{
uint64_t ret = ATTRIBUTE_SEEKABLE;
switch(OpenedMode)
{
case MODE_READ:
ret |= ATTRIBUTE_READABLE;
break;
case MODE_WRITE_SAFE:
case MODE_WRITE:
ret |= ATTRIBUTE_WRITEABLE;
break;
}
return ret;
}
uint64_t FileStream::read(void *data, uint64_t count, bool error_on_eos)
{
if (!fp)

View File

@ -30,8 +30,6 @@ class FileStream : public Stream
FileStream(const char *path, const int mode);
virtual ~FileStream();
virtual uint64_t attributes(void);
virtual uint64_t read(void *data, uint64_t count, bool error_on_eos = true);
virtual void write(const void *data, uint64_t count);
virtual void seek(int64_t offset, int whence);
@ -41,7 +39,6 @@ class FileStream : public Stream
private:
RFILE *fp;
int OpenedMode;
};

View File

@ -66,12 +66,6 @@ MemoryStream::~MemoryStream()
}
}
uint64 MemoryStream::attributes(void)
{
return (ATTRIBUTE_READABLE | ATTRIBUTE_WRITEABLE | ATTRIBUTE_SEEKABLE);
}
uint8 *MemoryStream::map(void)
{
return data_buffer;

View File

@ -39,8 +39,6 @@ class MemoryStream : public Stream
virtual ~MemoryStream();
virtual uint64 attributes(void);
virtual uint8 *map(void);
virtual void unmap(void);

View File

@ -21,14 +21,6 @@ class Stream
Stream();
virtual ~Stream();
enum
{
ATTRIBUTE_READABLE = 0,
ATTRIBUTE_WRITEABLE,
ATTRIBUTE_SEEKABLE
};
virtual uint64 attributes(void) = 0;
virtual uint64 read(void *data, uint64 count, bool error_on_eos = true) = 0;
virtual void write(const void *data, uint64 count) = 0;