mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
Fix command line parsing.
This commit is contained in:
parent
bd1e587ebe
commit
73e73ffdd5
1 changed files with 10 additions and 10 deletions
|
|
@ -342,19 +342,19 @@ parseCmdLine(int argc, char **argv)
|
|||
GLint i;
|
||||
|
||||
for (i = 1; i < argc; i++) {
|
||||
if (strstr(argv[i], "-w") == 0) {
|
||||
tex_width = atoi((argv[i]) + 2);
|
||||
}
|
||||
else if (strstr(argv[i], "-h") == 0) {
|
||||
tex_height = atoi((argv[i]) + 2);
|
||||
}
|
||||
else if (strstr(argv[i], "-d") == 0) {
|
||||
tex_depth = atoi((argv[i]) + 2);
|
||||
}
|
||||
else if (strcmp(argv[i], "-help") == 0) {
|
||||
if (strcmp(argv[i], "-help") == 0) {
|
||||
printHelp();
|
||||
return GL_FALSE;
|
||||
}
|
||||
else if (strstr(argv[i], "-w") != NULL) {
|
||||
tex_width = atoi((argv[i]) + 2);
|
||||
}
|
||||
else if (strstr(argv[i], "-h") != NULL) {
|
||||
tex_height = atoi((argv[i]) + 2);
|
||||
}
|
||||
else if (strstr(argv[i], "-d") != NULL) {
|
||||
tex_depth = atoi((argv[i]) + 2);
|
||||
}
|
||||
else {
|
||||
printf("%s (Bad option).\n", argv[i]);
|
||||
printHelp();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue