1
0
Fork 0
mirror of https://github.com/emersion/wlr-randr synced 2024-05-27 18:06:04 +02:00

Don't print refresh rate if zero

This commit is contained in:
emersion 2019-03-10 11:59:39 +01:00
parent 9e88a43034
commit 977ddebe7b
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48

6
main.c
View File

@ -71,8 +71,10 @@ static void print_state(struct randr_state *state) {
printf(" Modes:\n");
struct randr_mode *mode;
wl_list_for_each(mode, &head->modes, link) {
printf(" %dx%d px, %f Hz", mode->width, mode->height,
(float)mode->refresh / 1000);
printf(" %dx%d px", mode->width, mode->height);
if (mode->refresh > 0) {
printf(", %f Hz", (float)mode->refresh / 1000);
}
bool current = head->mode == mode;
if (current || mode->preferred) {
printf(" (");