Flush on writes to hard disk images, fixes partition creation on the Samsung SPC7700LP-W.

This commit is contained in:
OBattler
2024-09-24 04:32:46 +02:00
parent f2eb6a0161
commit 8c705b4ad1
2 changed files with 11 additions and 0 deletions

View File

@@ -577,6 +577,7 @@ hdd_image_write(uint8_t id, uint32_t sector, uint32_t count, uint8_t *buffer)
}
num_write = fwrite(buffer, 512, count, hdd_images[id].file);
fflush(hdd_images[id].file);
hdd_images[id].pos = sector + num_write;
}
}
@@ -618,6 +619,8 @@ hdd_image_zero(uint8_t id, uint32_t sector, uint32_t count)
hdd_images[id].pos = sector + i;
fwrite(empty_sector, 512, 1, hdd_images[id].file);
}
fflush(hdd_images[id].file);
}
}