mirror of https://github.com/axmolengine/axmol.git
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:
commit
24d6a1658d
|
@ -35,17 +35,20 @@ void CCNodeLoader::parseProperties(CCNode * pNode, CCNode * pParent, CCBReader *
|
||||||
{
|
{
|
||||||
setProp = true;
|
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)
|
if(platform == kCCBPlatformIOS)
|
||||||
{
|
{
|
||||||
setProp = true;
|
setProp = true;
|
||||||
}
|
}
|
||||||
#elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
// #elif (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||||
if(platform == kCCBPlatformMac)
|
// if(platform == kCCBPlatformMac)
|
||||||
{
|
// {
|
||||||
setProp = true;
|
// setProp = true;
|
||||||
}
|
// }
|
||||||
#endif
|
// #endif
|
||||||
|
|
||||||
// Forward properties for sub ccb files
|
// Forward properties for sub ccb files
|
||||||
if (dynamic_cast<CCBFile*>(pNode) != NULL)
|
if (dynamic_cast<CCBFile*>(pNode) != NULL)
|
||||||
|
|
Loading…
Reference in New Issue