mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-01 12:46:12 +00:00
comp: avoid an unnecessary struct copy for print modes
This commit is contained in:
parent
3dfec5f1ab
commit
d36123927d
|
@ -62,10 +62,10 @@ print_modes(struct comp_target *ct, VkDisplayModePropertiesKHR *mode_properties,
|
||||||
{
|
{
|
||||||
COMP_PRINT_MODE(ct->c, "Available Vk modes for direct mode");
|
COMP_PRINT_MODE(ct->c, "Available Vk modes for direct mode");
|
||||||
for (int i = 0; i < mode_count; i++) {
|
for (int i = 0; i < mode_count; i++) {
|
||||||
VkDisplayModePropertiesKHR props = mode_properties[i];
|
VkDisplayModePropertiesKHR *props = &mode_properties[i];
|
||||||
uint16_t width = props.parameters.visibleRegion.width;
|
uint16_t width = props->parameters.visibleRegion.width;
|
||||||
uint16_t height = props.parameters.visibleRegion.height;
|
uint16_t height = props->parameters.visibleRegion.height;
|
||||||
float refresh = (float)props.parameters.refreshRate / 1000.f;
|
float refresh = (float)props->parameters.refreshRate / 1000.f;
|
||||||
|
|
||||||
COMP_PRINT_MODE(ct->c, "| %2d | %dx%d@%.2f", i, width, height, refresh);
|
COMP_PRINT_MODE(ct->c, "| %2d | %dx%d@%.2f", i, width, height, refresh);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue