mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-25 15:35:23 +00:00
Properly report the default device when opening sound fails
This commit is contained in:
parent
2f0af42261
commit
1ccddefe28
@ -382,7 +382,12 @@ void OpenAL_Output::init(const std::string &devname)
|
||||
|
||||
mDevice = alcOpenDevice(devname.c_str());
|
||||
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"))
|
||||
std::cout << "Opened \""<<alcGetString(mDevice, ALC_ALL_DEVICES_SPECIFIER)<<"\"" << std::endl;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user