]> git.sesse.net Git - nageru/blobdiff - flags.cpp
Add a command-line option to change themes.
[nageru] / flags.cpp
index 21e71e99208765ee1122e6900fa3464f98b3839a..f8fea018ea89add3c754a604cfea5973eff1cc63 100644 (file)
--- a/flags.cpp
+++ b/flags.cpp
@@ -10,12 +10,14 @@ void parse_flags(int argc, char * const argv[])
 {
        static const option long_options[] = {
                { "num-cards", required_argument, 0, 'c' },
+               { "theme", required_argument, 0, 't' },
                { "va-display", required_argument, 0, 1000 },
+               { "http-uncompressed-video", no_argument, 0, 1001 },
                { 0, 0, 0, 0 }
        };
        for ( ;; ) {
                int option_index = 0;
-               int c = getopt_long(argc, argv, "c:", long_options, &option_index);
+               int c = getopt_long(argc, argv, "c:t:", long_options, &option_index);
 
                if (c == -1) {
                        break;
@@ -24,9 +26,15 @@ void parse_flags(int argc, char * const argv[])
                case 'c':
                        global_flags.num_cards = atoi(optarg);
                        break;
+               case 't':
+                       global_flags.theme_filename = optarg;
+                       break;
                case 1000:
                        global_flags.va_display = optarg;
                        break;
+               case 1001:
+                       global_flags.uncompressed_video_to_http = true;
+                       break;
                default:
                        fprintf(stderr, "Unknown option '%s'\n", argv[option_index]);
                        exit(1);