This commit is contained in:
halx99 2020-09-11 13:38:05 +08:00
parent 378975d768
commit a6b3fa91fd
2 changed files with 3 additions and 2 deletions

View File

@ -632,7 +632,6 @@ void CommandBufferGL::capture(TextureBackend* texture, std::function<void(const
{
PixelBufferDescriptor pbd;
if (!texture) { // screen capture
int bufferSize = _viewPort.w * _viewPort.h * 4;
std::unique_ptr<GLubyte[]> buffer(new GLubyte[bufferSize]);
memset(buffer.get(), 0, bufferSize);

View File

@ -1899,7 +1899,9 @@ int lua_cocos2dx_backend_TextureBackend_getBytes(lua_State* tolua_S)
tolua_error(tolua_S,"invalid arguments in function 'lua_cocos2dx_backend_TextureBackend_getBytes'", nullptr);
return 0;
}
cobj->getBytes(arg0, arg1, arg2, arg3, arg4, arg5);
// actual it's unused, and will crash, because the callback arg5 is empty
// futher new lua bindings sol2
// cobj->getBytes(arg0, arg1, arg2, arg3, arg4, arg5);
lua_settop(tolua_S, 1);
return 1;
}