https://git.reactos.org/?p=reactos.git;a=commitdiff;h=a3eb2d3811394641723cb…
commit a3eb2d3811394641723cb291fdab5c938bc46a11
Author: Amine Khaldi <amine.khaldi(a)reactos.org>
AuthorDate: Sat Jan 20 12:26:03 2018 +0100
Commit: Amine Khaldi <amine.khaldi(a)reactos.org>
CommitDate: Sat Jan 20 12:26:03 2018 +0100
[MMDEVAPI] Sync with Wine 3.0. CORE-14225
---
dll/win32/mmdevapi/devenum.c | 2 +-
dll/win32/mmdevapi/main.c | 10 ++++------
media/doc/README.WINE | 2 +-
3 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/dll/win32/mmdevapi/devenum.c b/dll/win32/mmdevapi/devenum.c
index e811714065..3cfe661c0f 100644
--- a/dll/win32/mmdevapi/devenum.c
+++ b/dll/win32/mmdevapi/devenum.c
@@ -595,7 +595,7 @@ static HRESULT WINAPI MMDevice_Activate(IMMDevice *iface, REFIID riid,
DWORD cls
if (SUCCEEDED(hr))
{
IPersistPropertyBag *ppb;
- hr = IUnknown_QueryInterface((IUnknown*)*ppv, &IID_IPersistPropertyBag,
(void*)&ppb);
+ hr = IUnknown_QueryInterface((IUnknown*)*ppv, &IID_IPersistPropertyBag,
(void **)&ppb);
if (SUCCEEDED(hr))
{
/* ::Load cannot assume the interface stays alive after the function
returns,
diff --git a/dll/win32/mmdevapi/main.c b/dll/win32/mmdevapi/main.c
index 9677761356..db5a1168e1 100644
--- a/dll/win32/mmdevapi/main.c
+++ b/dll/win32/mmdevapi/main.c
@@ -82,20 +82,17 @@ static BOOL load_driver(const WCHAR *name, DriverFuncs *driver)
return TRUE;
}
-static BOOL init_driver(void)
+static BOOL WINAPI init_driver(INIT_ONCE *once, void *param, void **context)
{
static const WCHAR drv_value[] =
{'A','u','d','i','o',0};
static WCHAR default_list[] =
{'p','u','l','s','e',',','a','l','s','a',',','o','s','s',',',
-
'c','o','r','e','a','u','d','i','o',0};
+
'c','o','r','e','a','u','d','i','o',',','a','n','d','r','o','i','d',0};
DriverFuncs driver;
HKEY key;
WCHAR reg_list[256], *p, *next, *driver_list = default_list;
- if(drvs.module)
- return TRUE;
-
if(RegOpenKeyW(HKEY_CURRENT_USER, drv_keyW, &key) == ERROR_SUCCESS){
DWORD size = sizeof(reg_list);
@@ -249,10 +246,11 @@ static IClassFactoryImpl MMDEVAPI_CF[] = {
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
{
+ static INIT_ONCE init_once = INIT_ONCE_STATIC_INIT;
unsigned int i = 0;
TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(riid), ppv);
- if(!init_driver()){
+ if(!InitOnceExecuteOnce(&init_once, init_driver, NULL, NULL)) {
ERR("Driver initialization failed\n");
return E_FAIL;
}
diff --git a/media/doc/README.WINE b/media/doc/README.WINE
index 6a0bf58c51..31f9c5eea2 100644
--- a/media/doc/README.WINE
+++ b/media/doc/README.WINE
@@ -97,7 +97,7 @@ reactos/dll/win32/mciseq # Synced to WineStaging-2.9
reactos/dll/win32/mciwave # Synced to WineStaging-2.9
reactos/dll/win32/mgmtapi # Synced to WineStaging-2.9
reactos/dll/win32/mlang # Synced to Wine-3.0
-reactos/dll/win32/mmdevapi # Synced to WineStaging-1.9.23
+reactos/dll/win32/mmdevapi # Synced to Wine-3.0
reactos/dll/win32/mpr # Synced to Wine-3.0
reactos/dll/win32/mprapi # Synced to WineStaging-2.9
reactos/dll/win32/msacm32 # Synced to WineStaging-2.16