mirror of https://github.com/axmolengine/axmol.git
Fix the crash of Texture2dTest when `—ndk-mode` is `release`
This commit is contained in:
parent
2d50df8b01
commit
54379f48a9
|
@ -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";
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue