diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-27 01:35:59 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-11-27 01:35:59 +0000 |
| commit | 10604cab8913a49d0c4b8c72f85b59054bac0dcb (patch) | |
| tree | 82cf2b2e500991fe328a564e8235580e9c6ab02a /macosx/PcsxrMemCardController.m | |
| parent | 61850440ef1bfbfa64c9462ccbbd210443a7d4d5 (diff) | |
| download | pcsxr-10604cab8913a49d0c4b8c72f85b59054bac0dcb.tar.gz | |
Resized the Memory Card manager for Mac OS X.
Emulator can't be started if the Memory Card manager window is open on Mac OS X.
Center the Memory Card manager window when it shows up.
The Memory Card manager will refresh when the window is brought back to the front (It used to be that closing the window, then re-opening it wouldn't reload the contents of the cards).
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72657 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardController.m')
| -rw-r--r-- | macosx/PcsxrMemCardController.m | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index df04fb4b..de918f74 100644 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -164,11 +164,16 @@ static inline void CopyMemcardData(char *from, char *to, int *i, char *str, int [super windowDidLoad]; // Implement this method to handle any initialization after your window controller's window has been loaded from its nib file. + [[self window] setDelegate:self]; +} + +- (void)windowDidBecomeKey:(NSNotification *)notification +{ [self loadMemoryCardInfoForCard:1]; [self loadMemoryCardInfoForCard:2]; } -- (int)findFreeMemCardSlot:(int)target_card +- (int)findFreeMemCardSlotInCard:(int)target_card { BOOL found = NO; NSString *blockName; @@ -237,15 +242,13 @@ static inline void CopyMemcardData(char *from, char *to, int *i, char *str, int NSInteger selectedIndex = [selection firstIndex]; - freeSlot = [self findFreeMemCardSlot:toCard]; + freeSlot = [self findFreeMemCardSlotInCard:toCard]; if (freeSlot == -1) { NSRunCriticalAlertPanel(NSLocalizedString(@"No Free Space", nil), [NSString stringWithFormat:NSLocalizedString(@"Memory card %d doesn't have a free block on it. Please remove some blocks on that card to continue", nil), toCard], NSLocalizedString(@"Okay", nil), nil, nil); return; } CopyMemcardData(source, destination, &freeSlot, str, selectedIndex); - - if (toCard == 1) { LoadMcd(1, Config.Mcd1); |
