mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 22:55:40 +12:00
Optionally flush file in File::Write
This commit is contained in:
parent
18f1ea5453
commit
ae24bd0701
1 changed files with 5 additions and 0 deletions
|
@ -148,6 +148,11 @@ void Kernel::writeFile(u32 messagePointer, Handle fileHandle) {
|
||||||
IOFile f(file->fd);
|
IOFile f(file->fd);
|
||||||
auto [success, bytesWritten] = f.writeBytes(data.get(), size);
|
auto [success, bytesWritten] = f.writeBytes(data.get(), size);
|
||||||
|
|
||||||
|
// TODO: Should this check only the byte?
|
||||||
|
if (writeOption) {
|
||||||
|
f.flush();
|
||||||
|
}
|
||||||
|
|
||||||
mem.write32(messagePointer, IPC::responseHeader(0x0803, 2, 2));
|
mem.write32(messagePointer, IPC::responseHeader(0x0803, 2, 2));
|
||||||
if (!success) {
|
if (!success) {
|
||||||
Helpers::panic("Kernel::WriteFile failed");
|
Helpers::panic("Kernel::WriteFile failed");
|
||||||
|
|
Loading…
Add table
Reference in a new issue