- for (int i = 1; i < ac-1; i++)
- if (i + 1 != ac)
- if (av[i] == "-x") {
- comArgs.rescalingFactor = atof(av[i + 1]);
- } else if (av[i] == "-o") {
- comArgs.maxOutputFPS = atoi(av[i + 1]);
- } else if (av[i] == "-b") {
- comArgs.backBufferSize = atoi(av[i + 1]);
- } else {
- cout << "Unknown command line parameters!\n";
- showUsage();
- exit(0);
- }
+ for (int i = 1; i < ac-2; i = i+2)
+ if ( strcmp(av[i], "-x") == 0 ) {
+ comArgs.rescalingFactor = atof(av[i + 1]);
+ } else if ( strcmp(av[i], "-o") == 0 ) {
+ comArgs.maxOutputFPS = atoi(av[i + 1]);
+ } else if ( strcmp(av[i], "-b") == 0 ) {
+ comArgs.backBufferSize = atoi(av[i + 1]);
+ } else {
+ cout << "Unknown command line parameters!\n";
+ showUsage();
+ exit(0);
+ }