Implement 2D graphic API (#87)

* Implement 2D graphic library based on LittlevGL

* Add lvgl license file
This commit is contained in:
Weining
2019-08-01 16:57:54 +08:00
committed by wenyongh
parent 1db5a2f697
commit 9aa9cbde77
86 changed files with 8675 additions and 10 deletions

View File

@ -1225,7 +1225,8 @@ wasm_runtime_addr_native_to_app(WASMModuleInstance *module_inst,
void *native_ptr)
{
WASMMemoryInstance *memory = module_inst->default_memory;
if ((uint8*)native_ptr < memory->heap_data)
if (memory->base_addr <= (uint8*)native_ptr
&& (uint8*)native_ptr < memory->end_addr)
return (uint8*)native_ptr - memory->memory_data;
else
return memory->heap_base_offset