mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 21:53:51 +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());
|
||||
if(!mDevice)
|
||||
{
|
||||
if(devname.empty())
|
||||
fail("Failed to open default device");
|
||||
else
|
||||
fail("Failed to open \""+devname+"\"");
|
||||
}
|
||||
if(alcIsExtensionPresent(mDevice, "ALC_ENUMERATE_ALL_EXT"))
|
||||
std::cout << "Opened \""<<alcGetString(mDevice, ALC_ALL_DEVICES_SPECIFIER)<<"\"" << std::endl;
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue