mirror of
https://github.com/libretro/beetle-pce-fast-libretro.git
synced 2024-11-23 07:50:03 +00:00
Cleanup
This commit is contained in:
parent
241b9ffbb1
commit
a2e8cf2403
@ -27,7 +27,6 @@
|
|||||||
|
|
||||||
FileStream::FileStream(const char *path, const int mode)
|
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);
|
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)
|
uint64_t FileStream::read(void *data, uint64_t count, bool error_on_eos)
|
||||||
{
|
{
|
||||||
if (!fp)
|
if (!fp)
|
||||||
|
@ -30,8 +30,6 @@ class FileStream : public Stream
|
|||||||
FileStream(const char *path, const int mode);
|
FileStream(const char *path, const int mode);
|
||||||
virtual ~FileStream();
|
virtual ~FileStream();
|
||||||
|
|
||||||
virtual uint64_t attributes(void);
|
|
||||||
|
|
||||||
virtual uint64_t read(void *data, uint64_t count, bool error_on_eos = true);
|
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 write(const void *data, uint64_t count);
|
||||||
virtual void seek(int64_t offset, int whence);
|
virtual void seek(int64_t offset, int whence);
|
||||||
@ -41,7 +39,6 @@ class FileStream : public Stream
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
RFILE *fp;
|
RFILE *fp;
|
||||||
int OpenedMode;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -66,12 +66,6 @@ MemoryStream::~MemoryStream()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64 MemoryStream::attributes(void)
|
|
||||||
{
|
|
||||||
return (ATTRIBUTE_READABLE | ATTRIBUTE_WRITEABLE | ATTRIBUTE_SEEKABLE);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
uint8 *MemoryStream::map(void)
|
uint8 *MemoryStream::map(void)
|
||||||
{
|
{
|
||||||
return data_buffer;
|
return data_buffer;
|
||||||
|
@ -39,8 +39,6 @@ class MemoryStream : public Stream
|
|||||||
|
|
||||||
virtual ~MemoryStream();
|
virtual ~MemoryStream();
|
||||||
|
|
||||||
virtual uint64 attributes(void);
|
|
||||||
|
|
||||||
virtual uint8 *map(void);
|
virtual uint8 *map(void);
|
||||||
virtual void unmap(void);
|
virtual void unmap(void);
|
||||||
|
|
||||||
|
@ -21,14 +21,6 @@ class Stream
|
|||||||
Stream();
|
Stream();
|
||||||
virtual ~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 uint64 read(void *data, uint64 count, bool error_on_eos = true) = 0;
|
||||||
virtual void write(const void *data, uint64 count) = 0;
|
virtual void write(const void *data, uint64 count) = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user