Rebase against 7d77d330a5b60be918dbf17d9d9ca357d93bff29

This commit is contained in:
Alistair Leslie-Hughes
2019-06-05 09:35:37 +10:00
parent 3287f0fc9b
commit a1afc6f151
7 changed files with 94 additions and 76 deletions

View File

@@ -1,4 +1,4 @@
From 51ba80615215fac54b251e56a374dfab9a2b834b Mon Sep 17 00:00:00 2001
From 3c3c84a7c1ff6ba6b785bd3d70b5a93912c39d0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sat, 15 Aug 2015 02:59:17 +0200
Subject: [PATCH] dxdiagn: Enumerate DirectSound devices and add some basic
@@ -11,7 +11,7 @@ Subject: [PATCH] dxdiagn: Enumerate DirectSound devices and add some basic
3 files changed, 233 insertions(+), 1 deletion(-)
diff --git a/dlls/dxdiagn/Makefile.in b/dlls/dxdiagn/Makefile.in
index c16396e464b..e926d3b2a8a 100644
index fa4b611f245..88c99803b06 100644
--- a/dlls/dxdiagn/Makefile.in
+++ b/dlls/dxdiagn/Makefile.in
@@ -1,5 +1,5 @@
@@ -19,13 +19,13 @@ index c16396e464b..e926d3b2a8a 100644
-IMPORTS = strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 user32 advapi32
+IMPORTS = strmiids dxguid uuid d3d9 ddraw version ole32 oleaut32 user32 advapi32 dsound
C_SRCS = \
container.c \
EXTRADLLFLAGS = -mno-cygwin
diff --git a/dlls/dxdiagn/provider.c b/dlls/dxdiagn/provider.c
index 1fdab5e2db0..6fb9e585dbd 100644
index 6b6f4e640cc..2626e4e77cb 100644
--- a/dlls/dxdiagn/provider.c
+++ b/dlls/dxdiagn/provider.c
@@ -38,6 +38,7 @@
@@ -36,6 +36,7 @@
#include "wine/fil_data.h"
#include "psapi.h"
#include "wbemcli.h"
@@ -33,7 +33,7 @@ index 1fdab5e2db0..6fb9e585dbd 100644
#include "wine/debug.h"
@@ -1354,11 +1355,85 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node)
@@ -1364,11 +1365,85 @@ static HRESULT build_displaydevices_tree(IDxDiagContainerImpl_Container *node)
return fill_display_information_fallback(node);
}
@@ -75,7 +75,7 @@ index 1fdab5e2db0..6fb9e585dbd 100644
+ /* the default device is enumerated twice, one time without GUID */
+ if (!guid) return TRUE;
+
+ snprintfW(buffer, sizeof(buffer)/sizeof(WCHAR), deviceid_fmtW, enum_ctx->index);
+ _snwprintf(buffer, sizeof(buffer)/sizeof(WCHAR), deviceid_fmtW, enum_ctx->index);
+ device = allocate_information_node(buffer);
+ if (!device)
+ {
@@ -99,8 +99,8 @@ index 1fdab5e2db0..6fb9e585dbd 100644
+ return FALSE;
+
+ name = module;
+ if ((p = strrchrW(name, '\\'))) name = p + 1;
+ if ((p = strrchrW(name, '/'))) name = p + 1;
+ if ((p = wcsrchr(name, '\\'))) name = p + 1;
+ if ((p = wcsrchr(name, '/'))) name = p + 1;
+
+ enum_ctx->hr = add_bstr_property(device, szDriverName, name);
+ if (FAILED(enum_ctx->hr))
@@ -119,7 +119,7 @@ index 1fdab5e2db0..6fb9e585dbd 100644
IDxDiagContainerImpl_Container *cont;
cont = allocate_information_node(DxDiag_SoundDevices);
@@ -1367,12 +1442,28 @@ static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
@@ -1377,12 +1452,28 @@ static HRESULT build_directsound_tree(IDxDiagContainerImpl_Container *node)
add_subcontainer(node, cont);
@@ -314,5 +314,5 @@ index 936707632a4..c80717cd392 100644
CoUninitialize();
}
--
2.18.0
2.20.1