Change chvideomode(1) to use "WIDTHxHEIGHTxBPP" consistently.

Previously chvideomode(1) used "WIDTHxHEIGHTxBPP" on the command line
while interactively it used "BPP x WIDTH x HEIGHT". Change everything
to "WIDTHxHEIGHTxBPP".
This commit is contained in:
Juhani Krekelä 2023-05-19 22:56:18 +03:00
parent f6d6b60c10
commit d671516e9c
1 changed files with 9 additions and 9 deletions

View File

@ -405,10 +405,10 @@ retry_pick_mode:
printf("\e[2K"); printf("\e[2K");
printf(" [%-*zu] ", num_modes_display_length, index); printf(" [%-*zu] ", num_modes_display_length, index);
if ( modes[i].control & DISPMSG_CONTROL_VALID ) if ( modes[i].control & DISPMSG_CONTROL_VALID )
printf("%u x %u x %u", printf("%ux%ux%u",
modes[i].fb_format, modes[i].view_xres,
modes[i].view_xres, modes[i].view_yres,
modes[i].view_yres); modes[i].fb_format);
else if ( modes[i].control & DISPMSG_CONTROL_OTHER_RESOLUTIONS ) else if ( modes[i].control & DISPMSG_CONTROL_OTHER_RESOLUTIONS )
printf("(enter a custom resolution)"); printf("(enter a custom resolution)");
else else
@ -494,9 +494,9 @@ retry_pick_mode:
uintmax_t req_height = yres; uintmax_t req_height = yres;
while ( argc - optind < 1 ) while ( argc - optind < 1 )
{ {
printf("Enter video mode [BPP x WIDTH x HEIGHT]: "); printf("Enter video mode [WIDTHxHEIGHTxBPP]: ");
fflush(stdout); fflush(stdout);
if ( scanf("%ju x %ju x %ju", &req_bpp, &req_width, &req_height) != 3 ) if ( scanf("%jux%jux%ju", &req_width, &req_height, &req_bpp) != 3 )
{ {
fgetc(stdin); fgetc(stdin);
fflush(stdin); fflush(stdin);
@ -515,10 +515,10 @@ retry_pick_mode:
if ( !set_current_mode(mode) ) if ( !set_current_mode(mode) )
{ {
mode_set_error = errno; mode_set_error = errno;
warn("Unable to set video mode %ju x %ju x %ju", warn("Unable to set video mode %jux%jux%ju",
(uintmax_t) mode.fb_format,
(uintmax_t) mode.view_xres, (uintmax_t) mode.view_xres,
(uintmax_t) mode.view_yres); (uintmax_t) mode.view_yres,
(uintmax_t) mode.fb_format);
goto retry_pick_mode; goto retry_pick_mode;
} }