Merge pull request #1659 from dumganhar/gles20

fixed #1577: Fix touch event lost on Win32, the reason is that:
Cocos2d-x is using touch event callback for all platforms, it's different from cocos2d-iphone which uses mouse event for Mac port. So we just need to touch event by using kCCBPlatformIOS.
This commit is contained in:
James Chen 2012-11-26 19:09:24 -08:00
commit 24d6a1658d
1 changed files with 10 additions and 7 deletions

View File

@ -35,17 +35,20 @@ void CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader *
{
setProp = true;
}
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
// Cocos2d-x is using touch event callback for all platforms,
// it's different from cocos2d-iphone which uses mouse event for Mac port.
// So we just need to touch event by using kCCBPlatformIOS.
//#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
if(platform == kCCBPlatformIOS)
{
setProp = true;
}
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
if(platform == kCCBPlatformMac)
{
setProp = true;
}
#endif
// #elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
// if(platform == kCCBPlatformMac)
// {
// setProp = true;
// }
// #endif
// Forward properties for sub ccb files
if (dynamic_cast<CCBFile*>(pNode) != NULL)