From 378aa209c630328d5e57a824beae5adc1fa0098a Mon Sep 17 00:00:00 2001 From: Extrems Date: Fri, 9 Feb 2024 17:59:47 -0500 Subject: [PATCH] Revert memory card write simplification for Wii --- gx/fileio/file_slot.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/gx/fileio/file_slot.c b/gx/fileio/file_slot.c index 16bab9b..bd2ef7a 100644 --- a/gx/fileio/file_slot.c +++ b/gx/fileio/file_slot.c @@ -808,7 +808,16 @@ int slot_save(int slot, int device) CARD_SetStatus(device, CardFile.filenum, &CardStatus); /* Write file sectors */ +#ifdef HW_RVL + while (filesize > 0) + { + CARD_Write(&CardFile, &out[done], SectorSize, done); + filesize -= SectorSize; + done += SectorSize; + } +#else CARD_Write(&CardFile, &out[done], filesize, done); +#endif /* Close file */ CARD_Close(&CardFile);