mirror of
https://github.com/love2d/love.git
synced 2026-08-19 12:14:20 +02:00
improve errors when openal fails to initialize
This commit is contained in:
@@ -145,10 +145,10 @@ Audio::Audio()
|
|||||||
context = alcCreateContext(device, attribs.data());
|
context = alcCreateContext(device, attribs.data());
|
||||||
|
|
||||||
if (context == nullptr)
|
if (context == nullptr)
|
||||||
throw love::Exception("Could not create context.");
|
throw love::Exception("Could not create context: %s", alcGetString(device, alcGetError(device)));
|
||||||
|
|
||||||
if (!alcMakeContextCurrent(context) || alcGetError(device) != ALC_NO_ERROR)
|
if (!alcMakeContextCurrent(context))
|
||||||
throw love::Exception("Could not make context current.");
|
throw love::Exception("Could not make context current: %s", alcGetString(device, alcGetError(device)));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ALC_EXT_EFX
|
#ifdef ALC_EXT_EFX
|
||||||
|
|||||||
Reference in New Issue
Block a user