Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
9fc0377f
Commit
9fc0377f
authored
Jul 26, 2011
by
Andrew Eikum
Committed by
Alexandre Julliard
Jul 26, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmdevapi: Try loading multiple audio drivers from the registry.
parent
8fcf7013
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
main.c
dlls/mmdevapi/main.c
+17
-6
No files found.
dlls/mmdevapi/main.c
View file @
9fc0377f
...
...
@@ -45,6 +45,7 @@
#include "mmdevapi.h"
#include "wine/debug.h"
#include "wine/unicode.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
mmdevapi
);
...
...
@@ -99,16 +100,26 @@ static BOOL init_driver(void)
return
TRUE
;
if
(
RegOpenKeyW
(
HKEY_CURRENT_USER
,
drv_key
,
&
key
)
==
ERROR_SUCCESS
){
WCHAR
driver_name
[
256
];
WCHAR
driver_name
[
256
]
,
*
p
,
*
next
;
DWORD
size
=
sizeof
(
driver_name
);
if
(
RegQueryValueExW
(
key
,
drv_value
,
0
,
NULL
,
(
BYTE
*
)
driver_name
,
&
size
)
==
ERROR_SUCCESS
){
BOOL
ret
=
load_driver
(
driver_name
);
&
size
)
==
ERROR_SUCCESS
&&
driver_name
[
0
]
!=
'\0'
){
RegCloseKey
(
key
);
if
(
!
ret
)
ERR
(
"Failed to load driver: %s
\n
"
,
wine_dbgstr_w
(
driver_name
));
return
ret
;
for
(
next
=
p
=
driver_name
;
next
;
p
=
next
+
1
){
next
=
strchrW
(
p
,
','
);
if
(
next
)
*
next
=
'\0'
;
if
(
load_driver
(
p
))
return
TRUE
;
TRACE
(
"Failed to load driver: %s
\n
"
,
wine_dbgstr_w
(
driver_name
));
}
ERR
(
"No drivers in the registry loaded successfully!
\n
"
);
return
FALSE
;
}
RegCloseKey
(
key
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment