mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2025-06-25 19:57:52 -05:00
FileSys: split the constructor into an Open method, in order to notify the opener something went wrong.
Kernel: Return an invalid handle to OpenFile when it failed to open.
This commit is contained in:
@ -22,6 +22,12 @@ public:
|
||||
File_SDMC(const Archive_SDMC* archive, const std::string& path, const Mode mode);
|
||||
~File_SDMC() override;
|
||||
|
||||
/**
|
||||
* Open the file
|
||||
* @return true if the file opened correctly
|
||||
*/
|
||||
bool Open() override;
|
||||
|
||||
/**
|
||||
* Read data from the file
|
||||
* @param offset Offset in bytes to start reading data from
|
||||
@ -61,6 +67,8 @@ public:
|
||||
bool Close() const override;
|
||||
|
||||
private:
|
||||
std::string path;
|
||||
Mode mode;
|
||||
FileUtil::IOFile* file;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user