diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-08 03:35:06 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-07-08 03:35:06 +0000 |
| commit | 60e436cbfc50b7ec6af134ecec0d4c19ee6b95ed (patch) | |
| tree | 874d0e8e909ea97c63fa08684fa8cad71c4ddda4 /macosx/PcsxrMemCardController.m | |
| parent | 1be32b430bb24d88642409f6b80338e36879c342 (diff) | |
| download | pcsxr-60e436cbfc50b7ec6af134ecec0d4c19ee6b95ed.tar.gz | |
Implement compaction of memory cards.
Other assorted bug fixes.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85890 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardController.m')
| -rwxr-xr-x | macosx/PcsxrMemCardController.m | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index e04ace66..00d77ca7 100755 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -133,12 +133,17 @@ int cardSize, freeConsBlocks, availBlocks; + if ([[[fromCard memoryArray] objectAtIndex:selectedIndex] flagNameIndex] == memFlagFree) { + NSBeep(); + return; + } + cardSize = [fromCard memorySizeAtIndex:selectedIndex]; freeConsBlocks = [toCard indexOfFreeBlocksWithSize:cardSize]; availBlocks = [toCard availableBlocks]; if (freeConsBlocks == -1 && availBlocks >= cardSize) { PcsxrMemoryObject *tmpmemobj = [fromCard.memoryArray objectAtIndex:selectedIndex]; - NSInteger copyOK = NSRunInformationalAlertPanel(NSLocalizedString(@"Free Size", nil), NSLocalizedString(@"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@ (%@),\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?", nil), NSLocalizedString(@"Yes", nil), NSLocalizedString(@"No", nil), nil, cardnum, tmpmemobj.englishName, tmpmemobj.sjisName, cardnum == 1 ? 2 : 1); + NSInteger copyOK = NSRunInformationalAlertPanel(NSLocalizedString(@"Free Size", nil), NSLocalizedString(@"Memory card %i does not have enough free consecutive blocks.\n\nIn order to copy over \"%@ (%@),\" memory card %i must be compressed. Compressing memory cards will make deleted blocks unrecoverable.\n\nDo you want to continue?", nil), NSLocalizedString(@"Yes", nil), NSLocalizedString(@"No", nil), nil, cardnum, tmpmemobj.englishName, tmpmemobj.sjisName, cardnum); if (copyOK != NSAlertDefaultReturn) { return; } |
