Easy multiplatform way to change orientation from landscape to portrait?

Hi,

I’m pretty new to cocos2d-x and I’m surprised to see change orientation between platforms is not as easy as it should be. The only easy, working way I have found is setting the frame size by hand when game boots up. Something like this:

Vec2 screenSize = glview->getFrameSize();
glview->setFrameSize(screenSize.y, screenSize.x);

Is there a cleaner way to do it? Because with this I think device is still configured as landscape (default cocos2d-x orietnation).

Cheers.

Hi again,

No one could help here with a solution with this question? I would really apreicate it.

Cheers.

You must manually do it for each platform, so for iOS you change it through Xcode, and for Android you change it in the AndroidManifect.xml. I do not know how/where to change for other platforms.

thanks for the answer