diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-12-04 06:34:43 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2011-12-04 06:34:43 +0000 |
| commit | 6c94af779d3a6a2ddc46e2c69935bbe58a5c5302 (patch) | |
| tree | 84da4e19542ee3299db6009b4a68f216e37b0cc1 /macosx/PcsxrMemCardController.m | |
| parent | 3bd6d16afd6b068de6b061a87cba955f5ca3ff88 (diff) | |
| download | pcsxr-6c94af779d3a6a2ddc46e2c69935bbe58a5c5302.tar.gz | |
Added PcsxrMemCardController to those listening for changes in the memory card.
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@72845 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardController.m')
| -rw-r--r-- | macosx/PcsxrMemCardController.m | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m index c842c4ea..9160d4cf 100644 --- a/macosx/PcsxrMemCardController.m +++ b/macosx/PcsxrMemCardController.m @@ -8,6 +8,7 @@ #import "PcsxrMemCardController.h" #import "PcsxrMemoryObject.h" +#import "ConfigurationController.h" #include "sio.h" #define MAX_MEMCARD_BLOCKS 15 @@ -159,12 +160,20 @@ static inline void CopyMemcardData(char *from, char *to, int *i, char *str, int [newArray release]; } +- (void)memoryCardDidChangeNotification:(NSNotification *)aNote +{ + [self loadMemoryCardInfoForCard:1]; + [self loadMemoryCardInfoForCard:2]; +} + - (void)windowDidLoad { [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]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memoryCardDidChangeNotification:) name:memChangeNotifier object:nil]; + } - (void)windowDidBecomeKey:(NSNotification *)notification @@ -337,4 +346,11 @@ static inline void CopyMemcardData(char *from, char *to, int *i, char *str, int } } +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter] removeObserver:self]; + + [super dealloc]; +} + @end |
