dropping SDL for the cross-platform version almost done
[dosdemo] / src / cfgopt.c
index 2592930..2197858 100644 (file)
@@ -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;