mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2024-12-25 21:59:11 +01:00
Respect implicit type on layer props log
The CRTC_X and CRTC_Y values can be negative. Log respectively. Additionally the SRC_W and SRC_H values are shifted. Shift these values back for the log.
This commit is contained in:
parent
6b2cbeb0d4
commit
71bd11377a
1 changed files with 15 additions and 3 deletions
18
output.c
18
output.c
|
@ -67,9 +67,21 @@ void output_log_layers(struct liftoff_output *output) {
|
|||
liftoff_list_for_each(layer, &output->layers, link) {
|
||||
liftoff_log(LIFTOFF_DEBUG, " Layer %p:", (void *)layer);
|
||||
for (i = 0; i < layer->props_len; i++) {
|
||||
liftoff_log(LIFTOFF_DEBUG, " %s = %"PRIu64,
|
||||
layer->props[i].name,
|
||||
layer->props[i].value);
|
||||
char *name = layer->props[i].name;
|
||||
uint64_t value = layer->props[i].value;
|
||||
|
||||
if (strcmp(name, "CRTC_X") == 0 ||
|
||||
strcmp(name, "CRTC_Y") == 0) {
|
||||
liftoff_log(LIFTOFF_DEBUG, " %s = %"PRIi32,
|
||||
name, (int32_t)value);
|
||||
} else if (strcmp(name, "SRC_W") == 0 ||
|
||||
strcmp(name, "SRC_H") == 0) {
|
||||
liftoff_log(LIFTOFF_DEBUG, " %s = %"PRIu64,
|
||||
name, value >> 16);
|
||||
} else {
|
||||
liftoff_log(LIFTOFF_DEBUG, " %s = %"PRIu64,
|
||||
name, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue