aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-04-07 10:13:57 +0200
committerGravatar Hanspeter Portner <dev@open-music-kontrollers.ch>2019-04-07 10:13:57 +0200
commit99f75a4ed857d3f28db7a17aac964f824c24020f (patch)
tree7137c308a2e7156871a36978c11459868e2ab393
parent8e5608005f507db142e2feced749c8db88598ed4 (diff)
parentb2a8589a731f0cb7541847195052e366a94ce18e (diff)
downloadcanvas_display.lv2-99f75a4ed857d3f28db7a17aac964f824c24020f.zip
canvas_display.lv2-99f75a4ed857d3f28db7a17aac964f824c24020f.tar.gz
canvas_display.lv2-99f75a4ed857d3f28db7a17aac964f824c24020f.tar.bz2
canvas_display.lv2-99f75a4ed857d3f28db7a17aac964f824c24020f.tar.xz
Merge commit 'b2a8589a731f0cb7541847195052e366a94ce18e'
-rw-r--r--canvas.lv2/canvas.lv2/idisp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/canvas.lv2/canvas.lv2/idisp.h b/canvas.lv2/canvas.lv2/idisp.h
index afe7371..099ab2c 100644
--- a/canvas.lv2/canvas.lv2/idisp.h
+++ b/canvas.lv2/canvas.lv2/idisp.h
@@ -44,7 +44,7 @@ _lv2_canvas_idisp_surf_init(LV2_Canvas_Idisp *idisp, int w, int h)
LV2_Inline_Display_Image_Surface *surf = &idisp->image_surface;
surf->width = w;
- surf->height = w > h ? h : w; // try to use 1:1 ratio
+ surf->height = h;
surf->stride = cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, surf->width);
surf->data = realloc(surf->data, surf->stride * surf->height);
if(!surf->data)
@@ -113,7 +113,7 @@ lv2_canvas_idisp_surf_configure(LV2_Canvas_Idisp *idisp,
W = w;
H = w / aspect_ratio;
}
- else // aspect_ratio == 0.f
+ else // aspect_ratio == 1.f
{
W = w;
H = h;