senolakkas / cocos2d-android

Automatically exported from code.google.com/p/cocos2d-android
Other
0 stars 0 forks source link

Calculation of screen size does not take orientation into account #11

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Force the screen to a fixed landscape orientation:

AndroidManifest.xml ->  android:screenOrientation="landscape"
OR
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

Set deviceOrientation_ to CCDeviceOrientationLandscapeLeft with
Director.sharedDirector().setLandscape(true);

-> winSize() will switch height and width
whichs results in strange display behavior.

Workaround:
Director.sharedDirector().setLandscape(false);

But this is a little bit confusing :-)

Original issue reported on code.google.com by christop...@gmail.com on 4 Apr 2010 at 1:51