Merge commit 'e426319' into orca (integrate fix to mg_image_size(), which doesn't need a current canvas anymore)
This commit is contained in:
commit
9b29e681fe
|
@ -352,14 +352,10 @@ void mg_surface_render_commands(mg_surface surface,
|
||||||
vec2 mg_image_size(mg_image image)
|
vec2 mg_image_size(mg_image image)
|
||||||
{
|
{
|
||||||
vec2 res = {0};
|
vec2 res = {0};
|
||||||
mg_canvas_data* canvas = __mgCurrentCanvas;
|
mg_image_data* imageData = mg_image_data_from_handle(image);
|
||||||
if(canvas)
|
if(imageData)
|
||||||
{
|
{
|
||||||
mg_image_data* imageData = mg_image_data_from_handle(image);
|
res = imageData->size;
|
||||||
if(imageData)
|
|
||||||
{
|
|
||||||
res = imageData->size;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return(res);
|
return(res);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue