#define TINYDS_UNUSED __attribute__((unused))
-#define OUTPUT_WIDTH 1280
-#define OUTPUT_HEIGHT 720
-
struct tinyds_output
{
struct tinyds_server *server;
struct tinyds_server *server;
struct tinyds_output *output;
struct ds_output *ds_output;
+ const struct ds_output_mode *mode;
server = wl_container_of(listener, server, new_output);
ds_output = data;
if (server->output)
return;
+ mode = ds_output_preferred_mode(ds_output);
+ ds_output_set_mode(ds_output, mode);
+
output = calloc(1, sizeof *output);
if (!output)
return;
}
output->swapchain = ds_swapchain_create(output->allocator,
- OUTPUT_WIDTH, OUTPUT_HEIGHT, DRM_FORMAT_XRGB8888); // FIXME output mode
+ mode->width, mode->height, DRM_FORMAT_XRGB8888);
if (!output->swapchain) {
ds_allocator_destroy(output->allocator);
free(output);