Skip to content

Commit f4ab30c

Browse files
committed
Merge pull request #621 from DigitalRuby/develop-v3
Fix for swapBuffers crash and animations issue Former-commit-id: 072ce3a
2 parents 2094dd3 + 87ef166 commit f4ab30c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cocos2d/Platforms/iOS/CCDirectorIOS.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,12 @@ - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interface
291291
-(void) viewWillAppear:(BOOL)animated
292292
{
293293
[super viewWillAppear:animated];
294-
[self startAnimation];
294+
295+
UIApplicationState state = UIApplication.sharedApplication.applicationState;
296+
if (state != UIApplicationStateBackground)
297+
{
298+
[self startAnimation];
299+
}
295300
}
296301

297302
-(void) viewDidAppear:(BOOL)animated

0 commit comments

Comments
 (0)