Problem: getWinSize() function returns wrong size for retina device.
Tested by this code
bool AppDelegate::applicationDidFinishLaunching()
{
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
CCSize pointsSize = pDirector->getWinSize();
CCLog("getWinSize w:%f h:%f",pointsSize.width,pointsSize.height);
CCSize pSize = pDirector->getWinSizeInPixels();
CCLog("getWinSizeInPixels w:%f h:%f",pSize.width,pSize.height);
...
}
Result for retina simulator:
Cocos2d: getWinSize w:640.000000 h:960.000000
Cocos2d: getWinSizeInPixels w:640.000000 h:960.000000
For iPad Retina Simulator and iPhone 4inch Simulator situation is the same.
Is it should be so? Or it is problem with simulator?
Can anyone check it on device (don’t have such possibility)?
Thanks in advance!
System:
OS X 10.8.2
XCode 4.5
cocos2d-2.1beta3-x-2.1.0