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
This commit is contained in:
suloku
2015-08-10 12:33:28 +02:00
parent 2493ec609d
commit aedfb36614
5 changed files with 16 additions and 8 deletions

View File

@@ -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_MAXFILES;i++) {
if(entries[i].gamecode[0]!=0xff) {
if(strnicmp((const char*)entries[i].filename,filename,strlen(filename))==0) {
if(strcasecmp(filename,(const char*)entries[i].filename)==0) {
if((gamecode && gamecode[0]!=0xff && memcmp(entries[i].gamecode,gamecode,4)!=0)
|| (company && company[0]!=0xff && memcmp(entries[i].company,company,2)!=0)) continue;
@@ -729,7 +729,7 @@ static s32 __card_allocblock(s32 chn,u32 blocksneed,cardcallback callback)
wrong.
*/
count++;
if(count>=((card->blocks)-CARD_SYSAREA)) return CARD_ERROR_BROKEN;
if(count>((card->blocks)-CARD_SYSAREA)) return CARD_ERROR_BROKEN;
currblock++;
if(currblock<CARD_SYSAREA || 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_SYSAREA || next>=card->blocks) return CARD_ERROR_BROKEN;

View File

@@ -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;

View File

@@ -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;