1
0
mirror of https://codeberg.org/vyivel/dulcepan/ synced 2025-06-24 22:44:18 +03:00

2 Commits

Author SHA1 Message Date
f9665e2661 meson: bump version to 1.0.2 2024-09-09 14:36:14 +03:00
fccc2e2e97 Fix processing of multiple output modes 2024-09-09 06:24:33 +03:00
2 changed files with 12 additions and 1 deletions

View File

@ -1,7 +1,7 @@
project(
'dulcepan',
'c',
version: '1.0.1',
version: '1.0.2',
license: 'GPL-3.0-only',
default_options: [
'c_std=c11',

View File

@ -79,6 +79,12 @@ static void frame_handle_buffer(void *data, struct zwlr_screencopy_frame_v1 *fra
wl_buffer_destroy(output->frame_buffer);
}
if ((int32_t)width != output->width || (int32_t)height != output->height) {
dp_log_fatal("Output/buffer size mismatch: mode=%" PRIi32 "x%" PRIi32 ", buffer=%" PRIu32
"x%" PRIu32,
output->width, output->height, width, height);
}
output->frame_format = format;
output->frame_stride = (int)stride;
output->frame_buffer = dp_buffer_create(output->state, output->width, output->height,
@ -156,6 +162,10 @@ static void output_handle_geometry(void *data, struct wl_output *wl_output, int3
static void output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags,
int32_t width, int32_t height, int32_t refresh) {
if ((flags & WL_OUTPUT_MODE_CURRENT) == 0) {
return;
}
struct dp_output *output = data;
if (output->has_geom) {
@ -178,6 +188,7 @@ static void output_handle_done(void *data, struct wl_output *wl_output) {
assert(output->name != NULL);
assert(output->width > 0 && output->height > 0);
if ((output->transform & WL_OUTPUT_TRANSFORM_90) != 0) {
output->transformed_width = output->height;
output->transformed_height = output->width;