1, /* fullscreen */
1, /* music */
1, /* sRGB */
- 1 /* anti-aliasing */
+ 1, /* anti-aliasing */
+ 1 /* vsync */
};
int parse_args(int argc, char **argv)
opt.music = 1;
} else if(strcmp(argv[i], "-nomusic") == 0) {
opt.music = 0;
+ } else if(strcmp(argv[i], "-vsync") == 0) {
+ opt.vsync = 1;
+ } else if(strcmp(argv[i], "-novsync") == 0) {
+ opt.vsync = 0;
} else if(strcmp(argv[i], "-h") == 0 || strcmp(argv[i], "-help") == 0) {
print_usage(argv[0]);
exit(0);
printf(" -srgb/-nosrgb: enable/disable sRGB framebuffer\n");
printf(" -aa/-noaa: enable/disable multisample anti-aliasing\n");
printf(" -music/-nomusic: enable/disable music playback\n");
+ printf(" -vsync/-novsync: enable/disable vertical sync\n");
printf(" -h,-help: print usage and exit\n");
}
opt.music = ts_lookup_int(ts, "demo.music", opt.music);
opt.srgb = ts_lookup_int(ts, "demo.srgb", opt.srgb);
opt.msaa = ts_lookup_int(ts, "demo.aa", opt.msaa);
+ opt.vsync = ts_lookup_int(ts, "demo.vsync", opt.vsync);
ts_free_tree(ts);
return 0;