Return an int not a u32 for proper error check.
This commit is contained in:
parent
a53f8738d8
commit
f6482417ab
2 changed files with 2 additions and 2 deletions
|
@ -517,7 +517,7 @@ size_t MetaFileSystem::SeekFile(u32 handle, s32 position, FileMove type)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 MetaFileSystem::ReadEntireFile(const std::string &filename, std::vector<u8> &data) {
|
int MetaFileSystem::ReadEntireFile(const std::string &filename, std::vector<u8> &data) {
|
||||||
int error = 0;
|
int error = 0;
|
||||||
u32 handle = pspFileSystem.OpenWithError(error, filename, FILEACCESS_READ);
|
u32 handle = pspFileSystem.OpenWithError(error, filename, FILEACCESS_READ);
|
||||||
if (handle == 0)
|
if (handle == 0)
|
||||||
|
|
|
@ -106,7 +106,7 @@ public:
|
||||||
// TODO: void IoCtl(...)
|
// TODO: void IoCtl(...)
|
||||||
|
|
||||||
// Convenience helper - returns < 0 on failure.
|
// Convenience helper - returns < 0 on failure.
|
||||||
u32 ReadEntireFile(const std::string &filename, std::vector<u8> &data);
|
int ReadEntireFile(const std::string &filename, std::vector<u8> &data);
|
||||||
|
|
||||||
void SetStartingDirectory(const std::string &dir) {
|
void SetStartingDirectory(const std::string &dir) {
|
||||||
lock_guard guard(lock);
|
lock_guard guard(lock);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue