summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-12-23 21:39:09 +0900
committerHermet Park <hermetpark@gmail.com>2019-12-23 21:39:09 +0900
commitae6cf1318be1d4fd7c2d8b5ee326ad27effece39 (patch)
treeb11813ec0b820ea486dfe0f52a888c3098d83aca
parent9bb9dba018904c33b9f9afe77002d461469d51e9 (diff)
compare list item count properly,
and remove s9 resolution in the default list.
-rw-r--r--src/bin/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/bin/main.c b/src/bin/main.c
index a812348..ce5a178 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1168,7 +1168,6 @@ static const Expedite_Resolution resolutions[] = {
1168 { "1080p-p", 1080, 1920}, 1168 { "1080p-p", 1080, 1920},
1169 { "wsvga", 1024, 600 }, 1169 { "wsvga", 1024, 600 },
1170 { "wsvga-p", 600 , 1024}, 1170 { "wsvga-p", 600 , 1024},
1171 { "s9", 1600, 900 },
1172 { NULL, 0, 0 } 1171 { NULL, 0, 0 }
1173}; 1172};
1174 1173
@@ -1305,7 +1304,7 @@ main(int argc, char **argv)
1305 unsigned int i; 1304 unsigned int i;
1306 1305
1307 fprintf(stderr, "Known resolution :\n"); 1306 fprintf(stderr, "Known resolution :\n");
1308 for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++) 1307 for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
1309 fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name, 1308 fprintf(stderr, " * %s\t%ix%i\n", resolutions[i].name,
1310 resolutions[i].width, resolutions[i].height); 1309 resolutions[i].width, resolutions[i].height);
1311 return 0; 1310 return 0;
@@ -1315,7 +1314,7 @@ main(int argc, char **argv)
1315 { 1314 {
1316 unsigned int i; 1315 unsigned int i;
1317 1316
1318 for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]); i++) 1317 for (i = 0; i < sizeof(resolutions)/sizeof(resolutions[0]) - 1; i++)
1319 if (!strcmp(resolutions[i].name, resolution)) 1318 if (!strcmp(resolutions[i].name, resolution))
1320 break; 1319 break;
1321 if (i == sizeof(resolutions)/sizeof(resolutions[0])) 1320 if (i == sizeof(resolutions)/sizeof(resolutions[0]))