@@ -462,21 +462,37 @@ char *render_deltas_brief(const enum ConfigState config_state, const struct SLis
462
462
continue ;
463
463
}
464
464
465
- // mode changes happen in their own operation
465
+ // mode changes happen in their own operation, with an enable
466
466
if (head_current_mode_not_desired (head )) {
467
- bufp += snprintf (bufp , len - (bufp - buf ), "%s%s:\n mode: %dx%d@%dHz -> %dx%d@%dHz\n " , // line up with vrr
467
+ bufp += snprintf (bufp , len - (bufp - buf ), "%s%s:\n mode: " , // line up with vrr
468
468
head -> name ,
469
- (!head -> current .enabled && head -> desired .enabled ) ? ": enabled" : "" ,
470
- head -> current .mode -> width ,
471
- head -> current .mode -> height ,
472
- mhz_to_hz_rounded (head -> current .mode -> refresh_mhz ),
473
- head -> desired .mode -> width ,
474
- head -> desired .mode -> height ,
475
- mhz_to_hz_rounded (head -> desired .mode -> refresh_mhz )
469
+ (!head -> current .enabled && head -> desired .enabled ) ? ": enabled" : ""
476
470
);
471
+
472
+ if (head -> current .mode ) {
473
+ bufp += snprintf (bufp , len - (bufp - buf ), "%dx%d@%dHz -> " ,
474
+ head -> current .mode -> width ,
475
+ head -> current .mode -> height ,
476
+ mhz_to_hz_rounded (head -> current .mode -> refresh_mhz )
477
+ );
478
+ } else {
479
+ bufp += snprintf (bufp , len - (bufp - buf ), "(no mode) -> " );
480
+ }
481
+
482
+ if (head -> desired .mode ) {
483
+ bufp += snprintf (bufp , len - (bufp - buf ), "%dx%d@%dHz\n" ,
484
+ head -> desired .mode -> width ,
485
+ head -> desired .mode -> height ,
486
+ mhz_to_hz_rounded (head -> desired .mode -> refresh_mhz )
487
+ );
488
+ } else {
489
+ bufp += snprintf (bufp , len - (bufp - buf ), "(no mode)\n" );
490
+ }
491
+
477
492
continue ;
478
493
}
479
494
495
+ // enable with no change in mode
480
496
if (!head -> current .enabled && head -> desired .enabled ) {
481
497
bufp += snprintf (bufp , len - (bufp - buf ), "%s: enabled\n" , head -> name );
482
498
continue ;
0 commit comments