aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/solaris.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-01-09 06:40:50 -0800
committerChris Robinson <[email protected]>2010-01-09 06:40:50 -0800
commitef7df2416debb882c42124bddc07808c00a4503b (patch)
tree20e2e8a67a0a3bb8d8175994b4f006c6fcc456cd /Alc/solaris.c
parentcb113315f7cacfef0ca1f7a08d714344a89447da (diff)
Hide OSS and Solaris devices if their files can't be stat'd
Diffstat (limited to 'Alc/solaris.c')
-rw-r--r--Alc/solaris.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/Alc/solaris.c b/Alc/solaris.c
index 4504a680..9cb4092a 100644
--- a/Alc/solaris.c
+++ b/Alc/solaris.c
@@ -112,7 +112,8 @@ static ALCboolean solaris_open_playback(ALCdevice *device, const ALCchar *device
if(data->fd == -1)
{
free(data);
- AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
+ if(errno != ENOENT)
+ AL_PRINT("Could not open %s: %s\n", driver, strerror(errno));
return ALC_FALSE;
}
@@ -291,6 +292,12 @@ void alc_solaris_deinit(void)
void alc_solaris_probe(ALCboolean capture)
{
+#ifdef HAVE_STAT
+ struct stat buf;
+ if(stat(GetConfigValue("solaris", "device", "/dev/audio"), &buf) != 0)
+ return;
+#endif
+
if(type == DEVICE_PROBE)
AppendDeviceList(solaris_device);
else if(type == ALL_DEVICE_PROBE)