Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/cocos2d/cocos2d-x
Browse files Browse the repository at this point in the history
  • Loading branch information
Walzer committed May 30, 2011
2 parents d8a8263 + 483ed22 commit 1024dde
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
4 changes: 4 additions & 0 deletions HelloWorld/AppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ bool AppDelegate::initInstance()

#endif // CC_PLATFORM_WOPHONE

#if (CC_TARGET_PLATFORM == CC_PLATFORM_AIRPLAY)
// MaxAksenov said it's NOT a very elegant solution. I agree, haha
CCDirector::sharedDirector()->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
#endif
bRet = true;
} while (0);
return bRet;
Expand Down
6 changes: 3 additions & 3 deletions HelloWorld/ios/HelloWorld.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1194,11 +1194,9 @@
29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
isa = PBXGroup;
children = (
BF4DE6AB138BB89600CF907D /* RootViewController.h */,
BF4DE6AC138BB89600CF907D /* RootViewController.mm */,
BF83517613275F5500F3C033 /* cocos2dx */,
BF5681CC1313A84D0055EEAC /* ios */,
BF755FA512A1012300450234 /* Classes */,
BF83517613275F5500F3C033 /* cocos2dx */,
BF755FAC12A1015E00450234 /* Resource */,
BF163FB9128E671C0010DC04 /* Resources-iPad */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
Expand Down Expand Up @@ -1242,6 +1240,8 @@
children = (
BF365AA612A103F70050DCF4 /* AppController.h */,
BF365AA712A103F70050DCF4 /* AppController.mm */,
BF4DE6AB138BB89600CF907D /* RootViewController.h */,
BF4DE6AC138BB89600CF907D /* RootViewController.mm */,
);
name = ios;
sourceTree = "<group>";
Expand Down
2 changes: 1 addition & 1 deletion cocos2dx/base_nodes/CCNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void CCNode::arrayMakeObjectsPerformSelector(CCArray* pArray, callbackFunc func)
CCARRAY_FOREACH(pArray, child)
{
CCNode* pNode = (CCNode*) child;
if(pNode && func)
if(pNode && (NULL != func))
{
(pNode->*func)();
}
Expand Down
12 changes: 8 additions & 4 deletions tests/AppDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ bool AppDelegate::initInstance()
|| ! pMainWnd->Create(TEXT("cocos2d: tests"), 480, 320));

#endif // CC_PLATFORM_WIN32


#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)

// OpenGLView initialized in testsAppDelegate.mm on ios platform, nothing need to do here.

#endif // CC_PLATFORM_IOS


#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)

// Android doesn't need to do anything.

#endif // CC_PLATFORM_ANDROID


#if (CC_TARGET_PLATFORM == CC_PLATFORM_WOPHONE)

// Initialize OpenGLView instance, that release by CCDirector when application terminate.
Expand All @@ -58,7 +58,11 @@ bool AppDelegate::initInstance()
#endif

#endif


#if (CC_TARGET_PLATFORM == CC_PLATFORM_AIRPLAY)
CCDirector::sharedDirector()->setDeviceOrientation(CCDeviceOrientationLandscapeLeft);
#endif

bRet = true;
} while (0);
return bRet;
Expand Down

0 comments on commit 1024dde

Please sign in to comment.