mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 06:39:46 -06:00
Reinstated the changes from rev 568. Also fixed the actual bug: fread() was told to read 1 n-byte record, while it should be told to read n 1-byte records, so we know exactly how much it actually read.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@573 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -22,6 +22,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <cstdio>
|
||||
#endif
|
||||
|
||||
namespace DiscIO
|
||||
@ -33,8 +35,8 @@ class PlainFileReader : public IBlobReader
|
||||
HANDLE hFile;
|
||||
PlainFileReader(HANDLE hFile_);
|
||||
#else
|
||||
FILE *file_;
|
||||
PlainFileReader(FILE *file__);
|
||||
FILE* file_;
|
||||
PlainFileReader(FILE* file__);
|
||||
#endif
|
||||
s64 size;
|
||||
|
||||
@ -43,7 +45,7 @@ public:
|
||||
~PlainFileReader();
|
||||
u64 GetDataSize() const { return size; }
|
||||
u64 GetRawSize() const { return size; }
|
||||
bool Read(u64 offset, u64 size, u8* out_ptr);
|
||||
bool Read(u64 offset, u64 nbytes, u8* out_ptr);
|
||||
};
|
||||
|
||||
} // namespace
|
||||
|
Reference in New Issue
Block a user