From b96092d6fbde83d1e3036a6591b0bed356526733 Mon Sep 17 00:00:00 2001 From: "SND\\MaddTheSane_cp" Date: Mon, 8 Sep 2014 14:27:51 +0000 Subject: OS X: Have the memory card images be represented as gif files. This makes it less of a chore handling the animation, as the OS will do it automatically for us now. git-svn-id: https://pcsxr.svn.codeplex.com/svn/pcsxr@91357 e17a0e51-4ae3-4d35-97c3-1a29b211df97 --- macosx/Source/PcsxrMemCardController.m | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'macosx/Source/PcsxrMemCardController.m') diff --git a/macosx/Source/PcsxrMemCardController.m b/macosx/Source/PcsxrMemCardController.m index 7fb139ea..7dbc271a 100644 --- a/macosx/Source/PcsxrMemCardController.m +++ b/macosx/Source/PcsxrMemCardController.m @@ -18,27 +18,12 @@ @interface PcsxrMemCardController () @property (readwrite, strong) PcsxrMemCardArray *memCard1Array; @property (readwrite, strong) PcsxrMemCardArray *memCard2Array; -@property (strong) NSTimer *imageAnimateTimer; @end @implementation PcsxrMemCardController @synthesize memCard1Array; @synthesize memCard2Array; -- (void)stopMemoryAnimation -{ - [self.imageAnimateTimer invalidate]; - self.imageAnimateTimer = nil; -} - -- (void)beginMemoryAnimation -{ - if (!_imageAnimateTimer) { - self.imageAnimateTimer = [[NSTimer alloc] initWithFireDate:[NSDate date] interval:0.30 target:self selector:@selector(animateMemCards:) userInfo:nil repeats:YES]; - [[NSRunLoop mainRunLoop] addTimer:self.imageAnimateTimer forMode:NSRunLoopCommonModes]; - } -} - - (void)setupValues:(int)theCards { NSParameterAssert(theCards < 4 && theCards > 0); @@ -97,13 +82,6 @@ [self setupValues:3]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(memoryCardDidChangeNotification:) name:memChangeNotifier object:nil]; - - [self beginMemoryAnimation]; -} - -- (void)animateMemCards:(NSTimer*)theTimer -{ - [[NSNotificationCenter defaultCenter] postNotificationName:memoryAnimateTimerKey object:self]; } - (IBAction)moveBlock:(id)sender @@ -232,7 +210,6 @@ - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; - [self.imageAnimateTimer invalidate]; } @end -- cgit v1.2.3