Zebediah Figura : devenum: Always scan for devices in CreateClassEnumerator().
Alexandre Julliard
julliard at winehq.org
Fri Mar 9 16:11:51 CST 2018
Module: wine
Branch: master
Commit: 6c30370ef577f7ff31fb6f2ba20354a1dc8583c1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6c30370ef577f7ff31fb6f2ba20354a1dc8583c1
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Thu Mar 8 23:42:16 2018 -0600
devenum: Always scan for devices in CreateClassEnumerator().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/devenum/createdevenum.c | 22 ----------------------
dlls/devenum/tests/devenum.c | 2 --
2 files changed, 24 deletions(-)
diff --git a/dlls/devenum/createdevenum.c b/dlls/devenum/createdevenum.c
index 7cfdbff..7c03852 100644
--- a/dlls/devenum/createdevenum.c
+++ b/dlls/devenum/createdevenum.c
@@ -547,12 +547,6 @@ static void register_vfw_codecs(void)
RegCloseKey(basekey);
}
-static HANDLE DEVENUM_populate_handle;
-static const WCHAR DEVENUM_populate_handle_nameW[] =
- {'_','_','W','I','N','E','_',
- 'D','e','v','e','n','u','m','_',
- 'P','o','p','u','l','a','t','e',0};
-
static HRESULT register_codecs(void)
{
HRESULT res;
@@ -566,21 +560,6 @@ static HRESULT register_codecs(void)
REGFILTERPINS2 rfp2;
HKEY basekey;
- if (DEVENUM_populate_handle)
- return S_OK;
- DEVENUM_populate_handle = CreateEventW(NULL, TRUE, FALSE, DEVENUM_populate_handle_nameW);
- if (GetLastError() == ERROR_ALREADY_EXISTS)
- {
- /* Webcams can take some time to scan if the driver is badly written and it enables them,
- * so have a 10 s timeout here
- */
- if (WaitForSingleObject(DEVENUM_populate_handle, 10000) == WAIT_TIMEOUT)
- WARN("Waiting for object timed out\n");
- TRACE("No need to rescan\n");
- return S_OK;
- }
- TRACE("Scanning for devices\n");
-
/* Since devices can change between session, for example because you just plugged in a webcam
* or switched from pulseaudio to alsa, delete all old devices first
*/
@@ -878,6 +857,5 @@ static HRESULT register_codecs(void)
register_vfw_codecs();
- SetEvent(DEVENUM_populate_handle);
return res;
}
diff --git a/dlls/devenum/tests/devenum.c b/dlls/devenum/tests/devenum.c
index 7e3270f..a08dece 100644
--- a/dlls/devenum/tests/devenum.c
+++ b/dlls/devenum/tests/devenum.c
@@ -445,11 +445,9 @@ static void test_codec(void)
/* unlike DirectShow filters, these are automatically generated, so
* enumerating them will destroy the key */
-todo_wine
ok(!find_moniker(&CLSID_AudioRendererCategory, mon), "codec should not be registered\n");
hr = IPropertyBag_Read(prop_bag, friendly_name, &var, NULL);
-todo_wine
ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), "got %#x\n", hr);
IPropertyBag_Release(prop_bag);
More information about the wine-cvs
mailing list