compare list item count properly,

and remove s9 resolution in the default list.
This commit is contained in:
Hermet Park 2019-12-23 21:39:09 +09:00 committed by Cedric BAIL
parent 433b9e3833
commit 4d683b635e
1 changed files with 2 additions and 3 deletions

View File

@ -1167,7 +1167,6 @@ static const Expedite_Resolution resolutions[] = {
{ "1080p", 1920, 1080},
{ "wsvga", 1024, 600 },
{ "wsvga-p", 600 , 1024},
{ "s9", 1600, 900 },
{ NULL, 0, 0 }
};
@ -1254,7 +1253,7 @@ main(int argc, char **argv)
unsigned int i;
fprintf(stderr, "Known resolution :\n");
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name,
resolutions[i].width, resolutions[i].height);
return 0;
@ -1264,7 +1263,7 @@ main(int argc, char **argv)
{
unsigned int i;
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++)
for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
if (!strcmp(resolutions[i].name, resolution))
break;
if (i == sizeof(resolutions)/sizeof(resolutions[0]))