aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2017-07-01 20:44:56 -0700
committerChris Robinson <[email protected]>2017-07-01 20:44:56 -0700
commit74139c914d90796fdc7bac65640dcdb305ea344f (patch)
tree78c45b74af36344cfa51ca9ce75088b7a84a60c1 /examples
parentcb83f4810565169afb6af5b2a72399d27901613a (diff)
Skip past the -device switch even if the device doesn't open
Diffstat (limited to 'examples')
-rw-r--r--examples/alffplay.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/alffplay.cpp b/examples/alffplay.cpp
index 56379953..f335760f 100644
--- a/examples/alffplay.cpp
+++ b/examples/alffplay.cpp
@@ -1430,12 +1430,9 @@ int main(int argc, char *argv[])
ALCdevice *dev = NULL;
if(argc > 3 && strcmp(argv[1], "-device") == 0)
{
+ fileidx = 3;
dev = alcOpenDevice(argv[2]);
- if(dev)
- {
- fileidx = 3;
- return dev;
- }
+ if(dev) return dev;
std::cerr<< "Failed to open \""<<argv[2]<<"\" - trying default" <<std::endl;
}
return alcOpenDevice(nullptr);