From 3b3eaee80ea5fc297d736e8e29396104048aebe2 Mon Sep 17 00:00:00 2001 From: u0u0 Date: Mon, 29 Nov 2021 09:59:00 +0800 Subject: [PATCH] stroke macro fix --- cocos/renderer/CCTexture2D.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cocos/renderer/CCTexture2D.cpp b/cocos/renderer/CCTexture2D.cpp index 7b3028e..4e0f91d 100644 --- a/cocos/renderer/CCTexture2D.cpp +++ b/cocos/renderer/CCTexture2D.cpp @@ -524,8 +524,12 @@ bool Texture2D::initWithString(const char *text, const FontDefinition& textDefin return false; } -#if (CC_TARGET_PLATFORM != CC_PLATFORM_MAC) && (CC_TARGET_PLATFORM != CC_PLATFORM_ANDROID) && (CC_TARGET_PLATFORM != CC_PLATFORM_IOS) - CCASSERT(textDefinition._stroke._strokeEnabled == false, "Currently stroke only supported on Mac, iOS and Android!"); +#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) + if (textDefinition._stroke._strokeEnabled) + { + CCLOGERROR("SystemFont Stroke Currently not support on Linux!"); + } + textDefinition._stroke._strokeEnabled = false; #endif PixelFormat pixelFormat = g_defaultAlphaPixelFormat;