From 145156d69830c17ea746713b13211023194291ba Mon Sep 17 00:00:00 2001 From: Dale Stammen Date: Tue, 28 Oct 2014 20:56:49 -0700 Subject: [PATCH] disabled distanceFieldEnabled for WP8 as the shader crashes some older windows phones --- cocos/2d/CCLabel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 79ec70dfca..cd6bcb43db 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -395,7 +395,13 @@ void Label::setFontAtlas(FontAtlas* atlas,bool distanceFieldEnabled /* = false * _commonLineHeight = _fontAtlas->getCommonLineHeight(); _contentDirty = true; } +#if CC_TARGET_PLATFORM != CC_PLATFORM_WP8 _useDistanceField = distanceFieldEnabled; +#else + // some older Windows Phones cannot run the ccShader_Label_df.frag program + // so we must disable distance field + _useDistanceField = false; +#endif _useA8Shader = useA8Shader; if (_currentLabelType != LabelType::TTF)