From 4ffbefdfc753770e56e23e471e2f5b9806bd114b Mon Sep 17 00:00:00 2001 From: Starla Insigna Date: Thu, 3 Jan 2013 16:54:11 -0500 Subject: Fixed freezing issue with selection screen --- Classes/Cart_CollectAppDelegate.m | 4 ++-- libs/cocos2d/Platforms/iOS/CCDirectorIOS.m | 3 +-- libs/cocos2d/ccMacros.h | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Classes/Cart_CollectAppDelegate.m b/Classes/Cart_CollectAppDelegate.m index c92d231..5444a12 100755 --- a/Classes/Cart_CollectAppDelegate.m +++ b/Classes/Cart_CollectAppDelegate.m @@ -61,8 +61,8 @@ // Try to use CADisplayLink director // if it fails (SDK < 3.1) use the default director - if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) - [CCDirector setDirectorType:kCCDirectorTypeDefault]; +// if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) + [CCDirector setDirectorType:kCCDirectorTypeNSTimer]; CCDirector *director = [CCDirector sharedDirector]; diff --git a/libs/cocos2d/Platforms/iOS/CCDirectorIOS.m b/libs/cocos2d/Platforms/iOS/CCDirectorIOS.m index c483665..aee3853 100755 --- a/libs/cocos2d/Platforms/iOS/CCDirectorIOS.m +++ b/libs/cocos2d/Platforms/iOS/CCDirectorIOS.m @@ -486,8 +486,7 @@ CGFloat __ccContentScaleFactor = 1; // uncomment this line to prevent 'freezing'. // It doesn't work on with the Fast Director // - // [[NSRunLoop currentRunLoop] addTimer:animationTimer - // forMode:NSRunLoopCommonModes]; + [[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSRunLoopCommonModes]; } -(void) mainLoop diff --git a/libs/cocos2d/ccMacros.h b/libs/cocos2d/ccMacros.h index 4e08725..a4c8821 100755 --- a/libs/cocos2d/ccMacros.h +++ b/libs/cocos2d/ccMacros.h @@ -156,7 +156,6 @@ default gl blend src function. Compatible with premultiplied alpha images. #define CC_DIRECTOR_INIT() \ do { \ window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; \ - if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) \ [CCDirector setDirectorType:kCCDirectorTypeNSTimer]; \ CCDirector *__director = [CCDirector sharedDirector]; \ [__director setDeviceOrientation:kCCDeviceOrientationPortrait]; \ -- cgit 1.4.1