summaryrefslogtreecommitdiff
path: root/macosx/PcsxrMemCardController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-24 19:38:11 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2011-11-24 19:38:11 +0000
commitef5d0defe91d406679d1c19fd22cdd5233a2ce33 (patch)
treebf1ff5c946e050d2e6b574c43b8bbfaa07a1062b /macosx/PcsxrMemCardController.m
parent2082062cd85a3cadf38c6d7644b9f27b4d5616e5 (diff)
downloadpcsxr-ef5d0defe91d406679d1c19fd22cdd5233a2ce33.tar.gz
More changes to the Memory Card manager for Mac OS X.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72612 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardController.m')
-rw-r--r--macosx/PcsxrMemCardController.m34
1 files changed, 20 insertions, 14 deletions
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m
index 454da1d3..103d8b95 100644
--- a/macosx/PcsxrMemCardController.m
+++ b/macosx/PcsxrMemCardController.m
@@ -15,8 +15,6 @@
static inline NSImage *imageFromMcd(short * icon)
{
NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL pixelsWide:16 pixelsHigh:16 bitsPerSample:8 samplesPerPixel:3 hasAlpha:NO isPlanar:NO colorSpaceName:NSCalibratedRGBColorSpace bytesPerRow:0 bitsPerPixel:0];
- //[imageRep setSize:NSMakeSize(32, 32)];
- //[imageRep setBitsPerSample:32];
#if 0
int x, y, c;
@@ -45,6 +43,8 @@ static inline NSImage *imageFromMcd(short * icon)
#endif
NSImage *theImage = [[NSImage alloc] init];
[theImage addRepresentation:imageRep];
+ [theImage setScalesWhenResized:YES];
+ [theImage setSize:NSMakeSize(32, 32)];
[imageRep release];
return [theImage autorelease];
}
@@ -162,24 +162,30 @@ static inline NSImage *imageFromMcd(short * icon)
- (IBAction)formatCard:(id)sender
{
- NSInteger memCardSelect = [sender tag];
- if (memCardSelect == 1) {
- CreateMcd(Config.Mcd1);
- [self loadMemoryCardInfoForCard:1];
- } else {
- CreateMcd(Config.Mcd2);
- [self loadMemoryCardInfoForCard:2];
+ NSInteger formatOkay = NSRunAlertPanel(NSLocalizedString(@"Format Card", nil), NSLocalizedString(@"Formatting a memory card will remove all data on it.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Format", nil), nil);
+ if (formatOkay == NSAlertAlternateReturn) {
+ NSInteger memCardSelect = [sender tag];
+ if (memCardSelect == 1) {
+ CreateMcd(Config.Mcd1);
+ [self loadMemoryCardInfoForCard:1];
+ } else {
+ CreateMcd(Config.Mcd2);
+ [self loadMemoryCardInfoForCard:2];
+ }
}
}
- (IBAction)deleteMemoryObject:(id)sender {
- NSInteger memCardSelect = [sender tag];
- if (memCardSelect == 1) {
+ NSInteger deleteOkay = NSRunAlertPanel(NSLocalizedString(@"Delete Block", nil), NSLocalizedString(@"Deleting a block will remove all saved data on that block.\n\nThis cannot be undone.", nil), NSLocalizedString(@"Cancel", nil), NSLocalizedString(@"Delete", nil), nil);
+ if (deleteOkay == NSAlertAlternateReturn) {
+ NSInteger memCardSelect = [sender tag];
+ if (memCardSelect == 1) {
- [self loadMemoryCardInfoForCard:1];
- } else {
+ [self loadMemoryCardInfoForCard:1];
+ } else {
- [self loadMemoryCardInfoForCard:2];
+ [self loadMemoryCardInfoForCard:2];
+ }
}
}
@end