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
40df53aa
Commit
40df53aa
authored
Mar 17, 2005
by
Jeremy White
Committed by
Alexandre Julliard
Mar 17, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not fallback to defaults if a driver, mapper, or midi is specified
in the registry; consolidate MMDRV_Init() into a single function.
parent
ac24801d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
50 deletions
+35
-50
lolvldrv.c
dlls/winmm/lolvldrv.c
+31
-50
winemm.h
dlls/winmm/winemm.h
+4
-0
No files found.
dlls/winmm/lolvldrv.c
View file @
40df53aa
...
...
@@ -715,71 +715,52 @@ static BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper)
}
/**************************************************************************
* MMDRV_Init
FromRegistry [internal]
* MMDRV_Init
*/
static
BOOL
MMDRV_InitFromRegistry
(
void
)
BOOL
MMDRV_Init
(
void
)
{
HKEY
hKey
;
char
buffer
[
256
];
char
driver_buffer
[
256
];
char
mapper_buffer
[
256
];
char
midi_buffer
[
256
];
char
*
p1
;
char
*
p2
;
DWORD
type
,
size
;
BOOL
ret
=
FALSE
;
TRACE
(
"()
\n
"
);
if
(
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
WinMM"
,
&
hKey
))
{
TRACE
(
"Cannot open WinMM config key
\n
"
);
return
FALSE
;
}
size
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hKey
,
"Drivers"
,
0
,
&
type
,
(
LPVOID
)
buffer
,
&
size
))
{
p1
=
buffer
;
while
(
p1
)
{
p2
=
strchr
(
p1
,
';'
);
if
(
p2
)
*
p2
++
=
'\0'
;
ret
|=
MMDRV_Install
(
p1
,
p1
,
FALSE
);
p1
=
p2
;
}
}
strcpy
(
driver_buffer
,
WINE_DEFAULT_WINMM_DRIVER
);
strcpy
(
mapper_buffer
,
WINE_DEFAULT_WINMM_MAPPER
);
strcpy
(
midi_buffer
,
WINE_DEFAULT_WINMM_MIDI
);
/* finish with mappers */
size
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hKey
,
"WaveMapper"
,
0
,
&
type
,
(
LPVOID
)
buffer
,
&
size
))
ret
|=
MMDRV_Install
(
"wavemapper"
,
buffer
,
TRUE
);
size
=
sizeof
(
buffer
);
if
(
!
RegQueryValueExA
(
hKey
,
"MidiMapper"
,
0
,
&
type
,
(
LPVOID
)
buffer
,
&
size
))
ret
|=
MMDRV_Install
(
"midimapper"
,
buffer
,
TRUE
);
if
(
!
RegCreateKeyA
(
HKEY_LOCAL_MACHINE
,
"Software
\\
Wine
\\
Wine
\\
Config
\\
WinMM"
,
&
hKey
))
{
size
=
sizeof
(
driver_buffer
);
if
(
RegQueryValueExA
(
hKey
,
"Drivers"
,
0
,
&
type
,
(
LPVOID
)
driver_buffer
,
&
size
))
strcpy
(
driver_buffer
,
WINE_DEFAULT_WINMM_DRIVER
);
RegCloseKey
(
hKey
);
/* finish with mappers */
size
=
sizeof
(
mapper_buffer
);
if
(
RegQueryValueExA
(
hKey
,
"WaveMapper"
,
0
,
&
type
,
(
LPVOID
)
mapper_buffer
,
&
size
))
strcpy
(
mapper_buffer
,
WINE_DEFAULT_WINMM_MAPPER
);
return
ret
;
}
size
=
sizeof
(
midi_buffer
);
if
(
RegQueryValueExA
(
hKey
,
"MidiMapper"
,
0
,
&
type
,
(
LPVOID
)
midi_buffer
,
&
size
))
strcpy
(
midi_buffer
,
WINE_DEFAULT_WINMM_MIDI
);
/**************************************************************************
* MMDRV_InitHardcoded [internal]
*/
static
BOOL
MMDRV_InitHardcoded
(
void
)
{
TRACE
(
"()
\n
"
);
/* first load hardware drivers */
MMDRV_Install
(
"wineoss.drv"
,
"wineoss.drv"
,
FALSE
);
/* finish with mappers */
MMDRV_Install
(
"wavemapper"
,
"msacm.drv"
,
TRUE
);
MMDRV_Install
(
"midimapper"
,
"midimap.drv"
,
TRUE
);
RegCloseKey
(
hKey
);
}
return
TRUE
;
}
p1
=
driver_buffer
;
while
(
p1
)
{
p2
=
strchr
(
p1
,
';'
);
if
(
p2
)
*
p2
++
=
'\0'
;
ret
|=
MMDRV_Install
(
p1
,
p1
,
FALSE
);
p1
=
p2
;
}
/**************************************************************************
* MMDRV_Init [internal]
*/
BOOL
MMDRV_Init
(
void
)
{
TRACE
(
"()
\n
"
);
/* FIXME: MMDRV_InitFromRegistry shall be MMDRV_Init in a near future */
return
MMDRV_InitFromRegistry
()
||
MMDRV_InitHardcoded
();
ret
|=
MMDRV_Install
(
"wavemapper"
,
mapper_buffer
,
TRUE
);
ret
|=
MMDRV_Install
(
"midimapper"
,
midi_buffer
,
TRUE
);
return
ret
;
}
/******************************************************************
...
...
dlls/winmm/winemm.h
View file @
40df53aa
...
...
@@ -28,6 +28,10 @@
#include "winbase.h"
#include "mmddk.h"
#define WINE_DEFAULT_WINMM_DRIVER "wineoss.drv"
#define WINE_DEFAULT_WINMM_MAPPER "msacm.drv"
#define WINE_DEFAULT_WINMM_MIDI "midimap.drv"
typedef
DWORD
(
WINAPI
*
MessageProc16
)(
UINT16
wDevID
,
UINT16
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
);
typedef
DWORD
(
WINAPI
*
MessageProc32
)(
UINT
wDevID
,
UINT
wMsg
,
DWORD
dwUser
,
DWORD
dwParam1
,
DWORD
dwParam2
);
...
...
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