glviewvol
diff src/opt.cc @ 6:f22be47a3572
moved to TransferFuncs completely
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 30 Dec 2014 06:22:54 +0200 |
parents | 32c4a7160350 |
children | 773f89037a35 |
line diff
1.1 --- a/src/opt.cc Mon Dec 29 15:59:55 2014 +0200 1.2 +++ b/src/opt.cc Tue Dec 30 06:22:54 2014 +0200 1.3 @@ -16,6 +16,8 @@ 1.4 { 1.5 opt.fname = 0; 1.6 opt.rend_type = REND_FAST; 1.7 + opt.xsz = 800; 1.8 + opt.ysz = 800; 1.9 } 1.10 1.11 static RendererType renderer_type(const char *name) 1.12 @@ -36,6 +38,13 @@ 1.13 if(argv[i][0] == '-') { 1.14 if(argv[i][2] == 0) { 1.15 switch(argv[i][1]) { 1.16 + case 's': 1.17 + if(sscanf(argv[++i], "%dx%d", &opt.xsz, &opt.ysz) != 2) { 1.18 + fprintf(stderr, "-s must be followed by the window size (WxH)\n"); 1.19 + return -1; 1.20 + } 1.21 + break; 1.22 + 1.23 case 'r': 1.24 if((opt.rend_type = renderer_type(argv[++i])) == REND_NONE) { 1.25 if(strcmp(argv[i], "help") == 0) {