summaryrefslogtreecommitdiff
path: root/macosx/PcsxrMemCardController.m
diff options
context:
space:
mode:
authorSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-06-25 21:02:27 +0000
committerSND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97>2013-06-25 21:02:27 +0000
commit6c9a81db199b7c6f86cc28d14255ab81d25a0f58 (patch)
tree971dd7f0d2e61bc8d56541c0110f2348340fb6d1 /macosx/PcsxrMemCardController.m
parent1e070eefdd97247bffec46c5553e435e2bcc9972 (diff)
downloadpcsxr-6c9a81db199b7c6f86cc28d14255ab81d25a0f58.tar.gz
Add animated memory card icons on OS X
git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@85554 e17a0e51-4ae3-4d35-97c3-1a29b211df97
Diffstat (limited to 'macosx/PcsxrMemCardController.m')
-rwxr-xr-xmacosx/PcsxrMemCardController.m11
1 files changed, 10 insertions, 1 deletions
diff --git a/macosx/PcsxrMemCardController.m b/macosx/PcsxrMemCardController.m
index eebc0fc6..d1bc8e4d 100755
--- a/macosx/PcsxrMemCardController.m
+++ b/macosx/PcsxrMemCardController.m
@@ -80,7 +80,6 @@ static inline void CopyMemcardData(char *from, char *to, int srci, int dsti, cha
return memCard2Array;
}
-
- (id)init
{
self = [self initWithWindowNibName:@"MemCardManager"];
@@ -159,6 +158,13 @@ static inline void CopyMemcardData(char *from, char *to, int srci, int dsti, cha
[[self window] setDelegate:self];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memoryCardDidChangeNotification:) name:memChangeNotifier object:nil];
+ imageAnimateTimer = [[NSTimer alloc] initWithFireDate:[NSDate dateWithTimeIntervalSinceNow:2] interval:2.0/3.0 target:self selector:@selector(animateMemCards:) userInfo:nil repeats:YES];
+ [[NSRunLoop mainRunLoop] addTimer:imageAnimateTimer forMode:NSDefaultRunLoopMode];
+}
+
+- (void)animateMemCards:(NSTimer*)theTimer
+{
+ [[NSNotificationCenter defaultCenter] postNotificationName:memoryAnimateTimerKey object:self];
}
- (void)windowDidBecomeKey:(NSNotification *)notification
@@ -404,6 +410,9 @@ static inline void CopyMemcardData(char *from, char *to, int srci, int dsti, cha
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
+ [imageAnimateTimer invalidate];
+
+ RELEASEOBJ(imageAnimateTimer);
RELEASEOBJ(memCard1Array);
RELEASEOBJ(memCard2Array);