Orientation Changes in Cocos2d-x v2

Orientation Changes in Cocos2d-x v2
0.0 0


I had been using the v0.13 cocos2d-x which was giving and option to set orientation through the director.which was working perfectly

In Version 2.0
I tried modifyin the manifest file to unlock orientation,bt in that case buttons were workin in which ever scape the game is started at.like if it was landscape ,it wont on portrait bt it willl on landscapeupsidedown.
also the setorientation function is in CCApplication is a dummy function.so was there a reason why the it was removed,coz im plannin to put the old cocos CCDirector->setoriention code for that part.
Also is there a function already availble in cocos2d-x v2 that lets me know whehter the orientation has changed. in the earlier version i was using the accelerometer to identify the change and setting the appropriate orientation