mirror of
https://github.com/reactos/wine.git
synced 2024-11-28 22:20:26 +00:00
mmdevapi: Disable sound if the user explicitly selects no driver.
This also tweaks the no-driver behavior to report 0 active devices instead of returning an error code.
This commit is contained in:
parent
7d46943067
commit
23c26982e9
@ -445,6 +445,9 @@ static HRESULT load_driver_devices(EDataFlow flow)
|
||||
UINT num, def, i;
|
||||
HRESULT hr;
|
||||
|
||||
if(!drvs.pGetEndpointIDs)
|
||||
return S_OK;
|
||||
|
||||
hr = drvs.pGetEndpointIDs(flow, &ids, &keys, &num, &def);
|
||||
if(FAILED(hr))
|
||||
return hr;
|
||||
@ -824,9 +827,6 @@ HRESULT MMDevEnum_Create(REFIID riid, void **ppv)
|
||||
{
|
||||
MMDevEnumImpl *This = MMDevEnumerator;
|
||||
|
||||
if(!drvs.pGetAudioEndpoint)
|
||||
return AUDCLNT_E_SERVICE_NOT_RUNNING;
|
||||
|
||||
if (!This)
|
||||
{
|
||||
This = HeapAlloc(GetProcessHeap(), 0, sizeof(*This));
|
||||
|
@ -104,9 +104,12 @@ static BOOL init_driver(void)
|
||||
DWORD size = sizeof(driver_name);
|
||||
|
||||
if(RegQueryValueExW(key, drv_value, 0, NULL, (BYTE*)driver_name,
|
||||
&size) == ERROR_SUCCESS && driver_name[0] != '\0'){
|
||||
&size) == ERROR_SUCCESS){
|
||||
RegCloseKey(key);
|
||||
|
||||
if(driver_name[0] == '\0')
|
||||
return TRUE;
|
||||
|
||||
for(next = p = driver_name; next; p = next + 1){
|
||||
next = strchrW(p, ',');
|
||||
if(next)
|
||||
|
Loading…
Reference in New Issue
Block a user