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
2e5cc85d
Commit
2e5cc85d
authored
Jun 14, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved config parameters to HKCU\Software\Wine\DirectSound.
parent
9ad3a97a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
23 deletions
+15
-23
dsound_main.c
dlls/dsound/dsound_main.c
+15
-23
No files found.
dlls/dsound/dsound_main.c
View file @
2e5cc85d
...
...
@@ -116,7 +116,8 @@ inline static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
char
*
buffer
,
DWORD
size
)
{
if
(
appkey
&&
!
RegQueryValueExA
(
appkey
,
name
,
0
,
NULL
,
buffer
,
&
size
))
return
0
;
return
RegQueryValueExA
(
defkey
,
name
,
0
,
NULL
,
buffer
,
&
size
);
if
(
defkey
&&
!
RegQueryValueExA
(
defkey
,
name
,
0
,
NULL
,
buffer
,
&
size
))
return
0
;
return
ERROR_FILE_NOT_FOUND
;
}
...
...
@@ -126,38 +127,29 @@ inline static DWORD get_config_key( HKEY defkey, HKEY appkey, const char *name,
void
setup_dsound_options
(
void
)
{
char
buffer
[
MAX_PATH
+
1
];
char
buffer
[
MAX_PATH
+
1
6
];
HKEY
hkey
,
appkey
=
0
;
DWORD
len
;
buffer
[
MAX_PATH
]
=
'\0'
;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\dsound */
if
(
RegCreateKeyExA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
dsound"
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
KEY_ALL_ACCESS
,
NULL
,
&
hkey
,
NULL
))
{
ERR
(
"Cannot create config registry key
\n
"
);
ExitProcess
(
1
);
}
/* @@ Wine registry key: HKCU\Software\Wine\DirectSound */
if
(
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
DirectSound"
,
&
hkey
))
hkey
=
0
;
len
=
GetModuleFileNameA
(
0
,
buffer
,
MAX_PATH
);
if
(
len
&&
len
<
MAX_PATH
)
{
HKEY
tmpkey
;
/* @@ Wine registry key: HKLM\Software\Wine\Wine\Config\AppDefaults\app.exe\dsound */
if
(
!
RegOpenKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
AppDefaults"
,
&
tmpkey
))
/* @@ Wine registry key: HKCU\Software\Wine\AppDefaults\app.exe\DirectSound */
if
(
!
RegOpenKeyA
(
HKEY_CURRENT_USER
,
"Software
\\
Wine
\\
AppDefaults"
,
&
tmpkey
))
{
char
appname
[
MAX_PATH
+
16
];
char
*
p
=
strrchr
(
buffer
,
'\\'
);
if
(
p
!=
NULL
)
{
lstrcpynA
(
appname
,
p
+
1
,
MAX_PATH
);
strcat
(
appname
,
"
\\
dsound"
);
TRACE
(
"appname = [%s]
\n
"
,
appname
);
if
(
RegOpenKeyA
(
tmpkey
,
appname
,
&
appkey
))
appkey
=
0
;
RegCloseKey
(
tmpkey
);
}
char
*
p
,
*
appname
=
buffer
;
if
((
p
=
strrchr
(
appname
,
'/'
)))
appname
=
p
+
1
;
if
((
p
=
strrchr
(
appname
,
'\\'
)))
appname
=
p
+
1
;
strcat
(
appname
,
"
\\
DirectSound"
);
TRACE
(
"appname = [%s]
\n
"
,
appname
);
if
(
RegOpenKeyA
(
tmpkey
,
appname
,
&
appkey
))
appkey
=
0
;
RegCloseKey
(
tmpkey
);
}
}
...
...
@@ -196,7 +188,7 @@ void setup_dsound_options(void)
ds_default_capture
=
atoi
(
buffer
);
if
(
appkey
)
RegCloseKey
(
appkey
);
RegCloseKey
(
hkey
);
if
(
hkey
)
RegCloseKey
(
hkey
);
if
(
ds_emuldriver
!=
DS_EMULDRIVER
)
WARN
(
"ds_emuldriver = %d (default=%d)
\n
"
,
ds_emuldriver
,
DS_EMULDRIVER
);
...
...
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