Orientation support

Is it possible to support boths orientation, landscape and portrait…If it is, how to achieve that?

Thnx,
Mr. jones

AFAIK, I think its impossible to support both landscape and portrait orientation.

Impossible why?

Thnx.

In iOS, when selected both orientations, the GLView display is wrong with default config.

In Android, there is no options to specify both the portrait and landscape orientation.

I have a fork of cocos2d-x in which I’ve added a orientation listener. You can see the source here:
https://github.com/idimiter/cocos2d-x it currently works only for iOS, but it won’t be too difficult to expand it for other mobile platforms. The project actually runs in one orientation and I make my own rotations and transitions when I receive an event about orientation change.

This is the commit for the orientation listener: https://github.com/idimiter/cocos2d-x/commit/7b1e0334c226eb88533abe1d4281fd306fc290ef

The way I do it for my project is: I have a base layer and all my elements are child of it, then on an orientation event I rotate the whole layer and change its contentSize with flipped width/height, after that I reposition the elements, just to make them reload with the new width/height.

In android manifest file you can set sensorLandscape|sensorPortrait

@dimi_t_d
Where can i find that listener?