mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-09-04 08:35:55 +00:00
IOS/FS: Make it harder to forget closing FDs
Return a FileHandle which will automatically close the FD when the handle goes out of scope. For the rare cases where this behaviour is undesirable, the FD can be released from the handle.
This commit is contained in:
parent
de15e09a4f
commit
2d8be6a77d
6 changed files with 59 additions and 9 deletions
|
@ -49,7 +49,6 @@ static void CreateVirtualFATFilesystem(std::shared_ptr<IOS::HLE::FS::FileSystem>
|
|||
// write the final 0 to 0 file from the second FAT to 20 MiB
|
||||
data[CDB_SIZE - 1] = 0;
|
||||
fs->WriteFile(*fd, data.data(), static_cast<u32>(data.size()));
|
||||
fs->Close(*fd);
|
||||
}
|
||||
|
||||
bool CBoot::BootNANDTitle(const u64 title_id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue