I have started to investigate running cocos2d-x on Windows using the airplay port. It all compiled fine and the tests run in the simulator but the airplay simulator is rotated the wrong way. The CCDirector is said to be landscape but the simulator is portrait. I’ve tried the ‘Configuration - Surface - Surface Orientation’ setting in the simulator but it doesn’t work.
I did try changing the ‘Preferences - Display Preferences - Auto-rotate Simulator window…’ and then I could rotate the orientation but the cocos-2d input was then incorrect.
I know this is probably a really simple thing to do but can anybody help me?
bool AppDelegate::initInstance()
{
// ..., other platforms
#if (CC_TARGET_PLATFORM == CC_PLATFORM_AIRPLAY)
// MaxAksenov said it's NOT a very elegant solution. I agree, haha
CCDirector::sharedDirector()->setDeviceOrientation(kCCDeviceOrientationLandscapeLeft);
#endif
}
Unfortunately for the Mac version this method does not work.
All the settings of emulator contain in a file development.icf, which is created automatically in the folder project resources.
Theoretically, we must edit the SurfacePredefinedResolution or SurfaceRotation but in practice it has no effect.
Consequently, need talk with developers of Airplay SDK about this issue .