mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-02 03:45:58 +01:00
backend/wayland: Use output state to set init custom mode
This commit is contained in:
parent
869b0f14bc
commit
83d9764ed8
1 changed files with 7 additions and 3 deletions
|
@ -764,11 +764,15 @@ static struct wlr_wl_output *output_create(struct wlr_wl_backend *backend,
|
||||||
wlr_log(WLR_ERROR, "Failed to allocate wlr_wl_output");
|
wlr_log(WLR_ERROR, "Failed to allocate wlr_wl_output");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
wlr_output_init(&output->wlr_output, &backend->backend, &output_impl,
|
|
||||||
backend->local_display, NULL);
|
|
||||||
struct wlr_output *wlr_output = &output->wlr_output;
|
struct wlr_output *wlr_output = &output->wlr_output;
|
||||||
|
|
||||||
wlr_output_update_custom_mode(wlr_output, 1280, 720, 0);
|
struct wlr_output_state state;
|
||||||
|
wlr_output_state_init(&state);
|
||||||
|
wlr_output_state_set_custom_mode(&state, 1280, 720, 0);
|
||||||
|
|
||||||
|
wlr_output_init(wlr_output, &backend->backend, &output_impl,
|
||||||
|
backend->local_display, &state);
|
||||||
|
wlr_output_state_finish(&state);
|
||||||
|
|
||||||
wlr_output->adaptive_sync_status = WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED;
|
wlr_output->adaptive_sync_status = WLR_OUTPUT_ADAPTIVE_SYNC_ENABLED;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue