mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-24 06:50:20 +01:00
Fix vgmstream123 to work with getopt properly.
I found this during the initial CMake work but didn't dig into it too much until now.
This commit is contained in:
parent
b469045937
commit
b0cb7eb44d
@ -639,12 +639,6 @@ int main(int argc, char **argv) {
|
||||
|
||||
while ((opt = getopt(argc, argv, "-D:F:L:M:S:b:d:f:o:@:hrv")) != -1) {
|
||||
switch (opt) {
|
||||
case 1:
|
||||
if (play_file(optarg, &par)) {
|
||||
status = 1;
|
||||
goto done;
|
||||
}
|
||||
break;
|
||||
case '@':
|
||||
if (play_playlist(optarg, &par)) {
|
||||
status = 1;
|
||||
@ -698,6 +692,15 @@ int main(int argc, char **argv) {
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
argc -= optind;
|
||||
argv += optind;
|
||||
|
||||
for (opt = 0; opt < argc; ++opt) {
|
||||
if (play_file(argv[opt], &par)) {
|
||||
status = 1;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
|
||||
if (repeat) {
|
||||
optind = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user