diff options
| author | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-06-25 21:02:27 +0000 |
|---|---|---|
| committer | SND\MaddTheSane_cp <SND\MaddTheSane_cp@e17a0e51-4ae3-4d35-97c3-1a29b211df97> | 2013-06-25 21:02:27 +0000 |
| commit | 6c9a81db199b7c6f86cc28d14255ab81d25a0f58 (patch) | |
| tree | 971dd7f0d2e61bc8d56541c0110f2348340fb6d1 /macosx/PcsxrMemCardController.m | |
| parent | 1e070eefdd97247bffec46c5553e435e2bcc9972 (diff) | |
| download | pcsxr-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-x | macosx/PcsxrMemCardController.m | 11 |
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); |
