diff --git a/common/draw.c b/common/draw.c index 8f8af1b31..76e72ccce 100644 --- a/common/draw.c +++ b/common/draw.c @@ -579,7 +579,11 @@ void draw_image_from_argb_data(DrawCtx *ctx, int x, int y, int w, int h, cairo_surface_t *source; source = cairo_image_surface_create_for_data(data, CAIRO_FORMAT_ARGB32, w, h, +#if CAIRO_VERSION_MAJOR < 1 || (CAIRO_VERSION_MAJOR == 1 && CAIRO_VERSION_MINOR < 5) + sizeof(unsigned char) * 4 * w); +#else cairo_format_stride_for_width(CAIRO_FORMAT_ARGB32, w)); +#endif cr = cairo_create(ctx->surface); if(wanted_h > 0 && h > 0) {