mirror of
https://gitlab.freedesktop.org/plymouth/plymouth.git
synced 2026-05-07 16:38:37 +02:00
drm: Guess device-scale when using simpledrm
When displaying on a simpledrm kms device the physical dimensions of the screen are unknown. Use the heuristics from ply_get_device_scale () to guess the device scale to avoid rendering things too small on 4K screens. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
This commit is contained in:
parent
f5eb3e57c2
commit
01702de71a
1 changed files with 7 additions and 3 deletions
|
|
@ -1230,9 +1230,13 @@ get_output_info (ply_renderer_backend_t *backend,
|
|||
mode = &connector->modes[0];
|
||||
}
|
||||
output->mode = *mode;
|
||||
output->device_scale = ply_get_device_scale (mode->hdisplay, mode->vdisplay,
|
||||
(!has_90_rotation) ? connector->mmWidth : connector->mmHeight,
|
||||
(!has_90_rotation) ? connector->mmHeight : connector->mmWidth);
|
||||
|
||||
if (backend->simpledrm)
|
||||
output->device_scale = ply_guess_device_scale (mode->hdisplay, mode->vdisplay);
|
||||
else
|
||||
output->device_scale = ply_get_device_scale (mode->hdisplay, mode->vdisplay,
|
||||
(!has_90_rotation) ? connector->mmWidth : connector->mmHeight,
|
||||
(!has_90_rotation) ? connector->mmHeight : connector->mmWidth);
|
||||
output->connector_type = connector->connector_type;
|
||||
output->connected = true;
|
||||
out:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue