who can tell me how to set device orientation on cocos2d-x 2.0?
This API has been removed?
In cocos2d-iphone 2.0, CCDirector inherits from UIViewController, and it has a delegate as a member variable.
So you can easily to change orientation by implementing [shouldAutorotateToInterfaceOrientation:interfaceOrientation].
I don’t know how to do it in cocos2d-x, because it is platform dependent.
Now you should set orientation at beginning:
- modify AndroidManifest.xml under ROOT_PROJECT/proj.android
- modify “- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation” in PROJECT_ROOT/ios/RootViewController.mm