Can change audio device

This commit is contained in:
Iwan Timmer
2015-05-10 23:55:18 +02:00
parent 3f10389863
commit 073d5f1b3e
3 changed files with 10 additions and 3 deletions

View File

@@ -85,6 +85,7 @@ static void help() {
printf("\t-nosops\t\t\tDon't allow GFE to modify game settings\n");
printf("\t-input <device>\t\tUse <device> as input. Can be used multiple times\n");
printf("\t-mapping <file>\t\tUse <file> as gamepad mapping configuration file (use before -input)\n");
printf("\t-audio <device>\t\tUse <device> as ALSA audio output device (default sysdefault)\n");
exit(0);
}
@@ -109,6 +110,7 @@ int main(int argc, char* argv[]) {
{"input", required_argument, 0, 'j'},
{"mapping", required_argument, 0, 'k'},
{"nosops", no_argument, 0, 'l'},
{"audio", required_argument, 0, 'm'},
{0, 0, 0, 0},
};
@@ -119,7 +121,7 @@ int main(int argc, char* argv[]) {
int option_index = 0;
bool sops = true;
int c;
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:l", long_options, &option_index)) != -1) {
while ((c = getopt_long_only(argc, argv, "-abc:d:efg:h:i:j:k:lm:", long_options, &option_index)) != -1) {
switch (c) {
case 'a':
config.width = 720;
@@ -159,6 +161,9 @@ int main(int argc, char* argv[]) {
case 'l':
sops = false;
break;
case 'm':
audio_device = optarg;
break;
case 1:
if (action == NULL)
action = optarg;