From aedfb36614458ec2e7d38197b2f7a967eae94a3c Mon Sep 17 00:00:00 2001 From: suloku Date: Mon, 10 Aug 2015 12:33:28 +0200 Subject: [PATCH] Ready for 1.4d release: * Fixed bug in card.c that prevented writing to the last block of the memory card, preventing restoring a savegame that would fill the memory card (thanks to undergroundmonorail) * Fixed bug in card.c that prevented correct block freeing when deleting a file and only was fixed by using the memory card on official software (the wii/gamecube save manager or probably also games) * Added libogc fix for a bug in card.c (the bug didn't affect GCMM, it was fixed in 1.4b, but I didn't change card.c) * Changed button presses for single savegame delete to prevent unvoluntary savegame deleting --- hbc/meta.xml | 4 ++-- readme.txt | 8 +++++++- source/card.c | 6 ++++-- source/main.c | 2 +- source/mcard.c | 4 ++-- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/hbc/meta.xml b/hbc/meta.xml index 4d0eb6a..3c534d8 100644 --- a/hbc/meta.xml +++ b/hbc/meta.xml @@ -2,8 +2,8 @@ GCMM Suloku - 1.4c - 20140105000000 + 1.4d + 20150808000000 Memory Card Manager A memory card manager for Wii/GC. diff --git a/readme.txt b/readme.txt index e5ff7c1..7f42227 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ ח–­—–­—–­—–­ –­—–­—–­—–­—–­—–­—–­—–­—–­—–­— ­—–­—–­—–­—–­—–­—–­—–­—-­—–­-–•Ĵ -|0O×ĝo· GCMM 1.4c by suloku ·oĝ×O0| +|0O×ĝo· GCMM 1.4d by suloku ·oĝ×O0| | http://code.google.com/p/gcmm | | (Under GPL License) | `¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' @@ -30,6 +30,12 @@ I (suloku) have updated the code to newest libraries to port it to the Wii syste |0O×ĝo· UPDATE HISTORY ·oĝ×O0| `¨•¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨ ¨¨¨¨¨¨¨¨¨¨¨¨¨' +[What's New 1.4d - august 08, 2015 - By suloku] +* Fixed bug in card.c that prevented writing to the last block of the memory card, preventing restoring a savegame that would fill the memory card (thanks to undergroundmonorail) +* Fixed bug in card.c that prevented correct block freeing when deleting a file and only was fixed by using the memory card on official software (the wii/gamecube save manager or probably also games) +* Added libogc fix for a bug in card.c (the bug didn't affect GCMM, it was fixed in 1.4b, but I didn't change card.c) +* Changed button presses for single savegame delete to prevent unvoluntary savegame deleting + [What's New 1.4c - january 05, 2014 - By suloku] * Disabled __sector_erase() check when raw restoring as some unofficial cards seem to have problems with it. diff --git a/source/card.c b/source/card.c index 0e564e2..92b7394 100644 --- a/source/card.c +++ b/source/card.c @@ -477,7 +477,7 @@ static s32 __card_getfilenum(card_block *card,const char *filename,const char *g entries = dirblock->entries; for(i=0;i=((card->blocks)-CARD_SYSAREA)) return CARD_ERROR_BROKEN; + if(count>((card->blocks)-CARD_SYSAREA)) return CARD_ERROR_BROKEN; currblock++; if(currblock=card->blocks) currblock = CARD_SYSAREA; @@ -762,6 +762,8 @@ static s32 __card_freeblock(s32 chn,u16 block,cardcallback callback) fatblock = __card_getbatblock(card); next = fatblock->fat[block-CARD_SYSAREA]; + fatblock->fat[block-CARD_SYSAREA] = 0; + fatblock->freeblocks++; while(1) { if(next==0xffff) break; if(next=card->blocks) return CARD_ERROR_BROKEN; diff --git a/source/main.c b/source/main.c index fc04109..142dd62 100644 --- a/source/main.c +++ b/source/main.c @@ -38,7 +38,7 @@ //Comment FLASHIDCHECK to allow writing any image to any mc. This will corrupt official cards. #define FLASHIDCHECK -const char appversion[] = "v1.4c"; +const char appversion[] = "v1.4d"; int mode; int cancel; int doall; diff --git a/source/mcard.c b/source/mcard.c index cf8bc9c..128ebb6 100644 --- a/source/mcard.c +++ b/source/mcard.c @@ -837,8 +837,8 @@ void MC_DeleteMode(int slot) return; } - //0 = B wass pressed -> delete the file - erase = WaitPromptChoice("Are you sure you want to delete the file?", "Delete", "Cancel"); + //0 = Z or 2 was pressed -> delete the file + erase = WaitPromptChoiceAZ("Are you sure you want to delete the file?", "Delete", "Cancel"); if (!erase) { // selected = 1;