DSound: Return error in get_device_info() if share mode not supported.

This commit is contained in:
David Reid
2018-12-30 14:20:59 +10:00
parent c3556a5d4c
commit b756bd674e
+4 -1
View File
@@ -7767,7 +7767,10 @@ BOOL CALLBACK mal_context_get_device_info_callback__dsound(LPGUID lpGuid, LPCSTR
mal_result mal_context_get_device_info__dsound(mal_context* pContext, mal_device_type deviceType, const mal_device_id* pDeviceID, mal_share_mode shareMode, mal_device_info* pDeviceInfo)
{
(void)shareMode;
/* Exclusive mode and capture not supported with DirectSound. */
if (deviceType == mal_device_type_capture && shareMode == mal_share_mode_exclusive) {
return MAL_SHARE_MODE_NOT_SUPPORTED;
}
if (pDeviceID != NULL) {
// ID.