summaryrefslogtreecommitdiff
path: root/macosx/PcsxrMemCardController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-08 03:35:06 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-07-08 03:35:06 +0000
commit60e436cbfc50b7ec6af134ecec0d4c19ee6b95ed (patch)
tree874d0e8e909ea97c63fa08684fa8cad71c4ddda4 /macosx/PcsxrMemCardController.m
parent1be32b430bb24d88642409f6b80338e36879c342 (diff)
downloadpcsxr-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-xmacosx/PcsxrMemCardController.m7
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;
}