From f1625a02aeeb104d112af79f8cf3ba543b2806d2 Mon Sep 17 00:00:00 2001 From: David Reid Date: Tue, 22 Oct 2019 17:31:20 +1000 Subject: [PATCH] Return a more accurate error code from ma_device_init(). --- miniaudio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniaudio.h b/miniaudio.h index a05fd264..98d9342f 100644 --- a/miniaudio.h +++ b/miniaudio.h @@ -26277,7 +26277,7 @@ ma_result ma_device_init(ma_context* pContext, const ma_device_config* pConfig, result = pContext->onDeviceInit(pContext, &config, pDevice); if (result != MA_SUCCESS) { - return MA_NO_BACKEND; /* The error message will have been posted with ma_post_error() by the source of the error so don't bother calling it here. */ + return result; } ma_device__post_init_setup(pDevice, pConfig->deviceType);