X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=dosdemo;a=blobdiff_plain;f=src%2Fcfgopt.c;h=2197858bd46f0ce08e4d4f7efe5f9d38282e96fd;hp=25929306949d00a9d1901ff3cf38139bdf8d4062;hb=b2c24e9d5b637bb78d18a377d9957c07d0759030;hpb=e8b26db00c934d141f16652cb8dcbeae23b17e48 diff --git a/src/cfgopt.c b/src/cfgopt.c index 2592930..2197858 100644 --- a/src/cfgopt.c +++ b/src/cfgopt.c @@ -53,6 +53,16 @@ int parse_args(int argc, char **argv) opt.dbginfo = 1; } else if(strcmp(argv[i], "-nodbg") == 0) { opt.dbginfo = 0; +#ifndef MSDOS + } else if(strcmp(argv[i], "-fs") == 0) { + opt.fullscreen = 1; + } else if(strcmp(argv[i], "-win") == 0) { + opt.fullscreen = 0; + } else if(strcmp(argv[i], "-scaler-nearest") == 0) { + opt.scaler = SCALER_NEAREST; + } else if(strcmp(argv[i], "-scaler-linear") == 0) { + opt.scaler = SCALER_LINEAR; +#endif } else { fprintf(stderr, "invalid option: %s\n", argv[i]); return -1; @@ -143,6 +153,16 @@ int load_config(const char *fname) opt.vsync = bool_value(value); } else if(strcmp(line, "debug") == 0) { opt.dbginfo = bool_value(value); +#ifndef MSDOS + } else if(strcmp(line, "fullscreen") == 0) { + opt.fullscreen = bool_value(value); + } else if(strcmp(line, "scaler") == 0) { + if(strcmp(value, "linear") == 0) { + opt.scaler = SCALER_LINEAR; + } else { + opt.scaler = SCALER_NEAREST; + } +#endif } else { fprintf(stderr, "%s:%d invalid option: %s\n", fname, nline, line); return -1;