Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f58ef5a9
Commit
f58ef5a9
authored
Mar 10, 2023
by
Davide Beatrici
Committed by
Alexandre Julliard
Mar 10, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winecoreaudio: Use GetModuleFileName() instead of hardcoded module filename for registry key.
parent
cb20ab84
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
mmdevdrv.c
dlls/winecoreaudio.drv/mmdevdrv.c
+16
-2
No files found.
dlls/winecoreaudio.drv/mmdevdrv.c
View file @
f58ef5a9
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
#define COBJMACROS
#define COBJMACROS
#include <stdarg.h>
#include <stdarg.h>
#include <wchar.h>
#include "windef.h"
#include "windef.h"
#include "winbase.h"
#include "winbase.h"
...
@@ -125,7 +126,7 @@ typedef struct _SessionMgr {
...
@@ -125,7 +126,7 @@ typedef struct _SessionMgr {
IMMDevice
*
device
;
IMMDevice
*
device
;
}
SessionMgr
;
}
SessionMgr
;
static
const
WCHAR
*
drv_key_devicesW
=
L"Software
\\
Wine
\\
Drivers
\\
winecoreaudio.drv
\\
devices"
;
static
WCHAR
drv_key_devicesW
[
256
]
;
static
HANDLE
g_timer_q
;
static
HANDLE
g_timer_q
;
...
@@ -196,14 +197,27 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
...
@@ -196,14 +197,27 @@ BOOL WINAPI DllMain(HINSTANCE dll, DWORD reason, void *reserved)
switch
(
reason
)
switch
(
reason
)
{
{
case
DLL_PROCESS_ATTACH
:
case
DLL_PROCESS_ATTACH
:
{
WCHAR
buf
[
MAX_PATH
];
WCHAR
*
filename
;
DisableThreadLibraryCalls
(
dll
);
DisableThreadLibraryCalls
(
dll
);
if
(
__wine_init_unix_call
())
if
(
__wine_init_unix_call
())
return
FALSE
;
return
FALSE
;
GetModuleFileNameW
(
dll
,
buf
,
ARRAY_SIZE
(
buf
));
filename
=
wcsrchr
(
buf
,
'\\'
);
filename
=
filename
?
filename
+
1
:
buf
;
swprintf
(
drv_key_devicesW
,
ARRAY_SIZE
(
drv_key_devicesW
),
L"Software
\\
Wine
\\
Drivers
\\
%s
\\
devices"
,
filename
);
g_timer_q
=
CreateTimerQueue
();
g_timer_q
=
CreateTimerQueue
();
if
(
!
g_timer_q
)
if
(
!
g_timer_q
)
return
FALSE
;
return
FALSE
;
break
;
break
;
}
case
DLL_PROCESS_DETACH
:
case
DLL_PROCESS_DETACH
:
if
(
reserved
)
break
;
if
(
reserved
)
break
;
DeleteCriticalSection
(
&
g_sessions_lock
);
DeleteCriticalSection
(
&
g_sessions_lock
);
...
...
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