compositor: configure VNC output size via weston.ini
Use parse_simple_mode() to allow configuring the VNC framebuffer size with a mode property in weston.ini, like this: [output] name=vnc mode=1280x720 Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
This commit is contained in:
parent
553387dd07
commit
0ece6cb436
@ -3138,11 +3138,17 @@ load_rdp_backend(struct weston_compositor *c,
|
|||||||
static int
|
static int
|
||||||
vnc_backend_output_configure(struct weston_output *output)
|
vnc_backend_output_configure(struct weston_output *output)
|
||||||
{
|
{
|
||||||
|
struct wet_output_config defaults = {
|
||||||
|
.width = 640,
|
||||||
|
.height = 480,
|
||||||
|
};
|
||||||
struct wet_compositor *compositor = to_wet_compositor(output->compositor);
|
struct wet_compositor *compositor = to_wet_compositor(output->compositor);
|
||||||
struct wet_output_config *parsed_options = compositor->parsed_options;
|
struct wet_output_config *parsed_options = compositor->parsed_options;
|
||||||
const struct weston_vnc_output_api *api = weston_vnc_output_get_api(output->compositor);
|
const struct weston_vnc_output_api *api = weston_vnc_output_get_api(output->compositor);
|
||||||
int width = 640;
|
struct weston_config *wc = wet_get_config(output->compositor);
|
||||||
int height = 480;
|
struct weston_config_section *section;
|
||||||
|
int width;
|
||||||
|
int height;
|
||||||
|
|
||||||
assert(parsed_options);
|
assert(parsed_options);
|
||||||
|
|
||||||
@ -3151,11 +3157,10 @@ vnc_backend_output_configure(struct weston_output *output)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parsed_options->width)
|
section = weston_config_get_section(wc, "output", "name", output->name);
|
||||||
width = parsed_options->width;
|
|
||||||
|
|
||||||
if (parsed_options->height)
|
parse_simple_mode(output, section, &width, &height, &defaults,
|
||||||
height = parsed_options->height;
|
compositor->parsed_options);
|
||||||
|
|
||||||
weston_output_set_scale(output, 1);
|
weston_output_set_scale(output, 1);
|
||||||
weston_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL);
|
weston_output_set_transform(output, WL_OUTPUT_TRANSFORM_NORMAL);
|
||||||
|
Loading…
Reference in New Issue
Block a user