mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
wlr_output: Make wlr_output_effective_resolution take state
This commit is contained in:
parent
c3b5e710f4
commit
34ec9319d0
11 changed files with 21 additions and 15 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue