screenshoter: don't use hardcoded bpp value

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
dev
Vasily Khoruzhick 12 years ago committed by Kristian Høgsberg
parent e565b40569
commit 094ca1d1ed
  1. 2
      src/screenshooter.c

@ -103,7 +103,7 @@ screenshooter_frame_notify(struct wl_listener *listener, void *data)
output->disable_planes--; output->disable_planes--;
wl_list_remove(&listener->link); wl_list_remove(&listener->link);
stride = l->buffer->width * 4; stride = l->buffer->width * (PIXMAN_FORMAT_BPP(output->compositor->read_format) / 8);
pixels = malloc(stride * l->buffer->height); pixels = malloc(stride * l->buffer->height);
if (pixels == NULL) { if (pixels == NULL) {

Loading…
Cancel
Save