GUACAMOLE-307: The "size" instruction can also apply to buffers, not just layers.
This commit is contained in:
parent
e3d8c3fa12
commit
ff6c4b04f4
@ -38,13 +38,13 @@ int guacenc_handle_size(guacenc_display* display, int argc, char** argv) {
|
||||
int width = atoi(argv[1]);
|
||||
int height = atoi(argv[2]);
|
||||
|
||||
/* Retrieve requested layer */
|
||||
guacenc_layer* layer = guacenc_display_get_layer(display, index);
|
||||
if (layer == NULL)
|
||||
/* Retrieve requested layer/buffer */
|
||||
guacenc_buffer* buffer = guacenc_display_get_related_buffer(display, index);
|
||||
if (buffer == NULL)
|
||||
return 1;
|
||||
|
||||
/* Resize layer */
|
||||
return guacenc_buffer_resize(layer->buffer, width, height);
|
||||
/* Resize layer/buffer */
|
||||
return guacenc_buffer_resize(buffer, width, height);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user