Try to get width via CCDirector testing with iPad (Retina) on Simulator but it returns same 1024 as in normal iPad


I’ve tested including a condition checking for iPad 3 resolution but CCDirector::sharedDirector()->getWinSize().width still returns the same 1024.
I’m not sure whether this is not yet support or anything, I tested it via Simulator and set the device to iPad (Retina).

Thanks !


You have to enable retina on iPad3 I guess to get the new dimensions


Do you know how to enable it via simulator ?


Do you know how to enable it via simulator ?


To enable retina (scaling)


Checking for iPad and iPad3 without using iOS code should do this

#define CC_IS_IPAD() (CCDirector::sharedDirector()->getWinSize().width==1024||CCDirector::sharedDirector()->getWinSize().height==1024) #define CC_IS_IPAD3() (CC_IS_IPAD() && CC_CONTENT_SCALE_FACTOR()>1.0f)


Cocos2d-x hasn’t supported ipad3 now.


Thanks for reply Herman, and Minggo !