fixed #2217: Format codes in CCDirector::createStatsLabel.

This commit is contained in:
James Chen 2013-05-23 15:11:48 +08:00
parent bb11182279
commit 22e259360e
1 changed files with 13 additions and 13 deletions

View File

@ -816,7 +816,7 @@ void CCDirector::getFPSImageData(unsigned char** datapointer, unsigned int* leng
void CCDirector::createStatsLabel()
{
CCTexture2D *texture = NULL;
CCTextureCache *textureCache = CCTextureCache::sharedTextureCache();
CCTextureCache *textureCache = CCTextureCache::sharedTextureCache();
if( m_pFPSLabel && m_pSPFLabel )
{
@ -830,8 +830,8 @@ void CCDirector::createStatsLabel()
CCTexture2DPixelFormat currentFormat = CCTexture2D::defaultAlphaPixelFormat();
CCTexture2D::setDefaultAlphaPixelFormat(kCCTexture2DPixelFormat_RGBA4444);
unsigned char *data = NULL;
unsigned int data_len = 0;
getFPSImageData(&data, &data_len);
unsigned int data_len = 0;
getFPSImageData(&data, &data_len);
CCImage* image = new CCImage();
bool isOK = image->initWithImageData(data, data_len);