Incorrect positioning on mobile landscape orientation when using setDesignResolutionSize

Hi all,

I’ve noticed on mobile when positioned in the landscape orientation the play area is cut off, and a blank space is on the bottom.

This is noticeable in Watermelon With Me. The scores are cut off on the top.

Is there anyway to fix this?

Thanks!

Because WaterMelon with Me is designed by physical engine chipmunk, it can run smooth on low end devices of android. So We didn’t fix it of full screen display.
Please refer to MoonWarriors.

Oh, sorry, the Fruit Attack and the MoonWarriors are not landscape. We will fix WaterMelon with me to have a landscape sample, :wink:

Hi,Tyson Ross.
You can have a try to set the size of the viewport,like the following:

800 is the width of your design resolution size.
Thanks!

To be clear, I think the problem is either in CCApplication or CCEGLview.

Attached is a screenshot of the problem. Notice the screen cut off at the top, and the blank space at the bottom.

I have a feeling the problem may lie in the CCEGLview in the ScrollToBottom function, in that it scrolls too far.

OK, I found where the problem is.

This function in CCEGLView is problematic. Why does it need to be there? What does it solve.

*initScreenSize:function{
this.*screenSize.width = this.*ele.clientWidth;
this.*screenSize.height = this.*ele.clientHeight;
if){
@ // This is the line that makes landscape games unusable on the iphone:
this.*screenSize.height +=(this._screenSize.width/320) * 60;@
}
},