mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-30 09:36:43 +00:00
Properly report the default device when opening sound fails
This commit is contained in:
parent
2f0af42261
commit
1ccddefe28
1 changed files with 6 additions and 1 deletions
|
@ -382,7 +382,12 @@ void OpenAL_Output::init(const std::string &devname)
|
||||||
|
|
||||||
mDevice = alcOpenDevice(devname.c_str());
|
mDevice = alcOpenDevice(devname.c_str());
|
||||||
if(!mDevice)
|
if(!mDevice)
|
||||||
fail("Failed to open \""+devname+"\"");
|
{
|
||||||
|
if(devname.empty())
|
||||||
|
fail("Failed to open default device");
|
||||||
|
else
|
||||||
|
fail("Failed to open \""+devname+"\"");
|
||||||
|
}
|
||||||
if(alcIsExtensionPresent(mDevice, "ALC_ENUMERATE_ALL_EXT"))
|
if(alcIsExtensionPresent(mDevice, "ALC_ENUMERATE_ALL_EXT"))
|
||||||
std::cout << "Opened \""<<alcGetString(mDevice, ALC_ALL_DEVICES_SPECIFIER)<<"\"" << std::endl;
|
std::cout << "Opened \""<<alcGetString(mDevice, ALC_ALL_DEVICES_SPECIFIER)<<"\"" << std::endl;
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue