Fix the crash of Texture2dTest when `—ndk-mode` is `release`

This commit is contained in:
samuele3hu 2014-06-11 11:24:17 +08:00
parent 2d50df8b01
commit 54379f48a9
2 changed files with 6 additions and 7 deletions

View File

@ -1986,10 +1986,10 @@ void TextureMemoryAlloc::updateImage(cocos2d::Ref *sender)
file = "Images/fire_rgba8888.pvr";
break;
case 2:
file = "Images/grossini_prv_rgba8888.pvr";
file = "Images/grossini_pvr_rgba8888.pvr";
break;
case 3:
file = "Images/grossini_prv_rgba4444.pvr";
file = "Images/grossini_pvr_rgba4444.pvr";
break;
case 4:
file = "Images/test_image_a8.pvr";

View File

@ -1263,19 +1263,18 @@ local function TextureMemoryAlloc()
end
cc.Director:getInstance():getTextureCache():removeUnusedTextures()
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
local file = ""
local targetPlatform = cc.Application:getInstance():getTargetPlatform()
if cc.PLATFORM_OS_ANDROID == targetPlatform then
if targetPlatform == cc.PLATFORM_OS_ANDROID then
if tag == 0 then
file = "Images/background.png"
elseif tag == 1 then
file = "Images/fire_rgba8888.pvr"
elseif tag == 2 then
file = "Images/grossini_prv_rgba8888.pvr"
file = "Images/grossini_pvr_rgba8888.pvr"
elseif tag == 3 then
file = "Images/grossini_prv_rgba4444.pvr"
file = "Images/grossini_pvr_rgba4444.pvr"
elseif tag == 4 then
file = "Images/test_image_a8.pvr"
end