Skip to content

Commit

Permalink
Fix crash on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
alinradut committed Aug 18, 2011
1 parent f4e6c61 commit 52b9948
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 2,508 deletions.
4 changes: 3 additions & 1 deletion Classes/AppDelegate.cpp
Expand Up @@ -78,8 +78,10 @@ bool AppDelegate::applicationDidFinishLaunching()
// turn on display FPS
pDirector->setDisplayFPS(true);

#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
pDirector->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);

#endif

// set FPS. the default value is 1.0/60 if you don't call this
pDirector->setAnimationInterval(1.0 / 60);

Expand Down
6 changes: 3 additions & 3 deletions Classes/HelloWorldScene.cpp
Expand Up @@ -81,7 +81,7 @@ bool HelloWorld::init()

this->schedule(schedule_selector(HelloWorld::update));
CCLOG("Loading music");
//CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic("background-music-aac.caf");
CocosDenshion::SimpleAudioEngine::sharedEngine()->playBackgroundMusic("background-music-aac.caf");

return true;
}
Expand Down Expand Up @@ -120,7 +120,7 @@ void HelloWorld::addTarget()
target->setTag(1);
_targets->addObject(target);

target->runAction(CCSequence::actions(actionMove, actionMoveDone));
target->runAction(CCSequence::actions(actionMove, actionMoveDone, NULL));
}

void HelloWorld::spriteMoveFinished(CCNode* sender)
Expand Down Expand Up @@ -192,7 +192,7 @@ void HelloWorld::ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent)
projectile->runAction(CCSequence::actions(CCMoveTo::actionWithDuration(realMoveDuration, realDest),
CCCallFuncN::actionWithTarget(this, callfuncN_selector(HelloWorld::spriteMoveFinished)),
NULL));
//CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("pew-pew-lei.caf");
CocosDenshion::SimpleAudioEngine::sharedEngine()->playEffect("pew-pew-lei.caf");

}

Expand Down
2 changes: 2 additions & 0 deletions SimpleGame.xcodeproj/.gitignore
@@ -0,0 +1,2 @@
*.pbxuser
*.mode1v3

0 comments on commit 52b9948

Please sign in to comment.