| 705 | |
| 706 | |
| 707 | int main(int argc, char **argv) |
| 708 | { |
| 709 | #ifdef _WIN32 |
| 710 | int winstyle = WS_OVERLAPPED | WS_SYSMENU | WS_CAPTION | WS_VISIBLE; |
| 711 | #endif |
| 712 | int i, screenWidth, screenHeight; |
| 713 | |
| 714 | fprintf(stderr, "\n%s v%s (Build %s)\n\n", BENCH_NAME, __VERSION, __BUILD); |
| 715 | |
| 716 | if(argc > 1) for(i = 1; i < argc; i++) |
| 717 | { |
| 718 | if(!stricmp(argv[i], "-h") || !strcmp(argv[i], "-?")) usage(argv); |
| 719 | #ifndef _WIN32 |
| 720 | else if(!stricmp(argv[i], "-checkdb")) |
| 721 | { |
| 722 | checkDB = true; |
| 723 | fprintf(stderr, "Checking double buffering. Watch for flashing to indicate that it is\n"); |
| 724 | fprintf(stderr, "not enabled. Performance will be sub-optimal.\n"); |
| 725 | } |
| 726 | #endif |
| 727 | else if(!stricmp(argv[i], "-noshm")) |
| 728 | { |
| 729 | doShm = false; |
| 730 | } |
| 731 | else if(!stricmp(argv[i], "-vid")) doVid = true; |
| 732 | else if(!stricmp(argv[i], "-v")) |
| 733 | { |
| 734 | fbx_printwarnings(stderr); |
| 735 | } |
| 736 | #ifndef _WIN32 |
| 737 | else if(!stricmp(argv[i], "-pm")) |
| 738 | { |
| 739 | doPixmap = true; doShm = false; |
| 740 | } |
| 741 | #endif |
| 742 | else if(!stricmp(argv[i], "-i")) interactive = true; |
| 743 | else if(!stricmp(argv[i], "-mt")) doStress = true; |
| 744 | else if(!stricmp(argv[i], "-fs")) |
| 745 | { |
| 746 | doFS = true; |
| 747 | #ifdef _WIN32 |
| 748 | winstyle = WS_EX_TOPMOST | WS_POPUP | WS_VISIBLE; |
| 749 | #endif |
| 750 | } |
| 751 | else if(!stricmp(argv[i], "-time") && i < argc - 1) |
| 752 | { |
| 753 | if(sscanf(argv[++i], "%lf", &benchTime) < 1 || benchTime <= 0.0) |
| 754 | usage(argv); |
| 755 | } |
| 756 | else if(!stricmp(argv[i], "-size") && i < argc - 1) |
| 757 | { |
| 758 | if(sscanf(argv[++i], "%dx%d", &drawableWidth, &drawableHeight) < 2 |
| 759 | || drawableWidth < 1 || drawableHeight < 1) |
| 760 | usage(argv); |
| 761 | } |
| 762 | else usage(argv); |
| 763 | } |
| 764 |
nothing calls this directly
no test coverage detected