I am new for Cocos2d-x, I found strange issue in my game we are testing in all simulator that working fine. also we are testing our game in iPhone 5 and iPad all thing working perfect but got an issue in only iPhone 4 device. there is game screen display small and there are show top and right side black area like following screenshot:
I check its all Default images size and resolution is correct as par apple guide line.
Can you please suggest me how to fix this issue. i can't figure it out is there any code related issue or something need to change in xcode.
Following is iPhone 5 screen shot:
Here is my appdelegate code:
bool AppDelegate::applicationDidFinishLaunching()
{
wrapper->authenticateLocalPlayer();
// initialize director
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
// turn on display FPS
pDirector->setDisplayStats(false);
// set FPS. the default value is 1.0/60 if you don't call this
pDirector->setAnimationInterval(1.0 / 60);
CCSize Size = CCDirector::sharedDirector()->getWinSize();
IPADX = Size.width/1024;
IPADY = Size.height/768;
if (Size.width==1024 || Size.width==2048){
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(1024, 768, kResolutionExactFit);
SCALEX = 1.0f;
SCALEY = 1.0f;
}
else
{
if (Size.width<568)
{
SCALEX = 960.0f/1024;
SCALEY = 640.0f/768;
}
else
{
SCALEX = 1136.0f/1024;
SCALEY = 640.0f/768;
}
}
// create a scene. it's an autorelease object
CCScene *pScene = HelloWorld::scene();
// run
pDirector->runWithScene(pScene);
return true;
}
DesignResolutionSize
for glView ? Look Appdelegate. – iphonic640x960
– iphonic