wlr_output: Make wlr_output_effective_resolution take state

This commit is contained in:
Alexander Orzechowski 2026-05-15 11:46:24 -04:00
parent d65a3fceaf
commit a8aa9fdf2b
10 changed files with 20 additions and 14 deletions

View file

@ -475,10 +475,16 @@ void wlr_output_transformed_resolution(struct wlr_output *output,
}
void wlr_output_effective_resolution(struct wlr_output *output,
int *width, int *height) {
wlr_output_transformed_resolution(output, NULL, width, height);
*width /= output->scale;
*height /= output->scale;
const struct wlr_output_state *state, int *width, int *height) {
wlr_output_transformed_resolution(output, state, width, height);
float scale = output->scale;
if (state && state->committed & WLR_OUTPUT_STATE_SCALE) {
scale = state->scale;
}
*width /= scale;
*height /= scale;
}
struct wlr_output_mode *wlr_output_preferred_mode(struct wlr_output *output) {