From 8db8b68edd6043b73fbe601a9567b0d4979b7195 Mon Sep 17 00:00:00 2001 From: Johns Date: Sat, 4 Feb 2012 16:38:10 +0100 Subject: Makes Workarounds command line configurable. --- softhddev.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'softhddev.c') diff --git a/softhddev.c b/softhddev.c index 8dadd84..32a21b9 100644 --- a/softhddev.c +++ b/softhddev.c @@ -1165,7 +1165,11 @@ const char *CommandLineHelp(void) " -d display\tdisplay of x11 server (fe. :0.0)\n" " -f\t\tstart with fullscreen window (only with window manager)\n" " -g geometry\tx11 window geometry wxh+x+y\n" - " -x\t\tstart x11 server\n" " -s\t\tstart in suspended mode\n"; + " -x\t\tstart x11 server\n" " -s\t\tstart in suspended mode\n" + " -w workaround\tenable/disable workarounds\n" + "\tno-hw-decoder\t\tdisable hw decoder, use software decoder only\n" + "\tno-mpeg-hw-decoder\tdisable hw decoder for mpeg only\n" + "\talsa-driver-broken\tdisable broken alsa driver message\n"; } /** @@ -1180,7 +1184,7 @@ int ProcessArgs(int argc, char *const argv[]) // Parse arguments. // for (;;) { - switch (getopt(argc, argv, "-a:p:d:fg:xs")) { + switch (getopt(argc, argv, "-a:d:fg:p:sw:x")) { case 'a': // audio device AudioSetDevice(optarg); continue; @@ -1207,6 +1211,17 @@ int ProcessArgs(int argc, char *const argv[]) case 's': // start in suspend mode ConfigStartSuspended = 1; continue; + case 'w': // workarounds + if (!strcasecmp("no-hw-decoder", optarg)) { + } else if (!strcasecmp("no-mpeg-hw-decoder", optarg)) { + } else if (!strcasecmp("alsa-driver-broken", optarg)) { + AudioAlsaDriverBroken = 1; + } else { + fprintf(stderr, _("Workaround '%s' unsupported\n"), + optarg); + return 0; + } + continue; case EOF: break; case '-': -- cgit v1.2.3