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


#1

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 !


#2

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


#3

Do you know how to enable it via simulator ?


#4

Do you know how to enable it via simulator ?


#5

To enable retina (scaling)

pDirector->enableRetinaDisplay(true);

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)


#6

Cocos2d-x hasn’t supported ipad3 now.


#7

Thanks for reply Herman, and Minggo !