How to detect I'm using an iPad instead of an Iphone?

hi guys. How would you make this solution to work in a cross platform project? (android). Maybe using pre-compiler directives?

This.

Jesús
@jboschaiguade

@J B, This might help you:

static inline bool IsIOS() {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
  return true;
#else
  return false;
#endif
}

static inline bool IsAndroid() {
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
  return true;
#else
  return false;
#endif
}

c o o l :slight_smile:

I think all the information in this threads worths to be in the wiki… I might compile it. Thanks!

I’m not sure if I should open another thread, but how do you do to position elements once you have the necessary assets in different resolutions? Cocos2D-X handles this or do we need to scale the positions according to the asset resolution? this

Cocos2d-x 2.0 has bool isIpad() already!