[SOLVED] Android screen orientation problem

Hi everybody :wink:

I’m starting with Cocos2D-x and when I run with Eclipse (even on my phone) I only can see the HelloWorld in portrait (when should be landscape) and also there is another problem… the screen is upside down! (check the snapshot).

I’m using the last Crstax ndk 6 (android-ndk-r6-crystax-2-windows.zip), with the last cocos2d-x version. Android SDK is 2.2.

Thanks for your help!


Captura.JPG (71.9 KB)

why did you can only set to portrait? You can set to landscape in AndroidManifest.xml. BTW, why not use official NDK toolchain?

Hi!

Yes, it’s on landscape in AndroidManifest.xml:

Is it correct?

About NDK I thought that Crystax was needed :). I’m going to test with the official NDK.

Yes, it is right. And don’t use CCDirector::setDeviceOrientation() at the same time.

Yes, it is right. And don’t use CCDirector::setDeviceOrientation() at the same time.

Thanks! Without the setDeviceOrientation() works :).

P.S.: I’ve just found another topic talking about this, sorry for duplicating!