wlr_output: Make wlr_output_effective_resolution take state

This commit is contained in:
Alexander Orzechowski 2023-12-05 20:36:52 -05:00
parent c3b5e710f4
commit 34ec9319d0
11 changed files with 21 additions and 15 deletions

View file

@ -457,10 +457,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) {