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
4f4dd855
Commit
4f4dd855
authored
Mar 31, 2010
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Apr 01, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Defer loading drivers until they are requested.
parent
39208d4d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
10 deletions
+14
-10
lolvldrv.c
dlls/winmm/lolvldrv.c
+14
-5
winemm.h
dlls/winmm/winemm.h
+0
-1
winmm.c
dlls/winmm/winmm.c
+0
-4
No files found.
dlls/winmm/lolvldrv.c
View file @
4f4dd855
...
...
@@ -47,7 +47,7 @@ typedef struct tagWINE_LLTYPE {
int
nMapper
;
/* index to mapper */
}
WINE_LLTYPE
;
static
int
MMDrvsHi
/* = 0 */
;
static
int
drivers_loaded
,
MMDrvsHi
;
static
WINE_MM_DRIVER
MMDrvs
[
8
];
static
LPWINE_MLD
MM_MLDrvs
[
40
];
#define MAX_MM_MLDRVS (sizeof(MM_MLDrvs) / sizeof(MM_MLDrvs[0]))
...
...
@@ -66,6 +66,15 @@ static WINE_LLTYPE llTypes[MMDRV_MAX] = {
};
#undef A
static
void
MMDRV_Init
(
void
);
static
void
MMDRV_InitSingleType
(
UINT
type
)
{
if
(
!
drivers_loaded
)
{
drivers_loaded
=
1
;
MMDRV_Init
();
}
}
/**************************************************************************
* MMDRV_GetNum [internal]
*/
...
...
@@ -73,6 +82,7 @@ UINT MMDRV_GetNum(UINT type)
{
TRACE
(
"(%04x)
\n
"
,
type
);
assert
(
type
<
MMDRV_MAX
);
MMDRV_InitSingleType
(
type
);
return
llTypes
[
type
].
wMaxId
;
}
...
...
@@ -109,7 +119,6 @@ DWORD MMDRV_Message(LPWINE_MLD mld, UINT wMsg, DWORD_PTR dwParam1,
lpDrv
=
&
MMDrvs
[
mld
->
mmdIndex
];
part
=
&
lpDrv
->
parts
[
mld
->
type
];
#if 0
/* some sanity checks */
if (!(part->nIDMin <= devID))
...
...
@@ -265,6 +274,7 @@ LPWINE_MLD MMDRV_Get(HANDLE _hndl, UINT type, BOOL bCanBeID)
TRACE
(
"(%p, %04x, %c)
\n
"
,
_hndl
,
type
,
bCanBeID
?
'Y'
:
'N'
);
assert
(
type
<
MMDRV_MAX
);
MMDRV_InitSingleType
(
type
);
if
(
hndl
>=
llTypes
[
type
].
wMaxId
&&
hndl
!=
(
UINT16
)
-
1
&&
hndl
!=
(
UINT
)
-
1
)
{
...
...
@@ -528,7 +538,7 @@ static BOOL MMDRV_Install(LPCSTR drvRegName, LPCSTR drvFileName, BOOL bIsMapper)
/**************************************************************************
* MMDRV_Init
*/
BOOL
MMDRV_Init
(
void
)
static
void
MMDRV_Init
(
void
)
{
HKEY
hKey
;
char
driver_buffer
[
256
];
...
...
@@ -564,7 +574,6 @@ BOOL MMDRV_Init(void)
ret
|=
MMDRV_Install
(
"wavemapper"
,
WINE_DEFAULT_WINMM_MAPPER
,
TRUE
);
ret
|=
MMDRV_Install
(
"midimapper"
,
WINE_DEFAULT_WINMM_MIDI
,
TRUE
);
return
ret
;
}
/******************************************************************
...
...
@@ -595,7 +604,7 @@ static BOOL MMDRV_ExitPerType(LPWINE_MM_DRIVER lpDrv, UINT type)
*
*
*/
void
MMDRV_Exit
(
void
)
void
MMDRV_Exit
(
void
)
{
unsigned
int
i
;
TRACE
(
"()
\n
"
);
...
...
dlls/winmm/winemm.h
View file @
4f4dd855
...
...
@@ -137,7 +137,6 @@ BOOL DRIVER_GetLibName(LPCWSTR keyName, LPCWSTR sectName, LPWSTR buf, int sz);
LPWINE_DRIVER
DRIVER_TryOpenDriver32
(
LPCWSTR
fn
,
LPARAM
lParam2
);
void
DRIVER_UnloadAll
(
void
);
BOOL
MMDRV_Init
(
void
);
void
MMDRV_Exit
(
void
);
UINT
MMDRV_GetNum
(
UINT
);
LPWINE_MLD
MMDRV_Alloc
(
UINT
size
,
UINT
type
,
LPHANDLE
hndl
,
DWORD
*
dwFlags
,
...
...
dlls/winmm/winmm.c
View file @
4f4dd855
...
...
@@ -155,10 +155,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID fImpLoad)
if
(
!
WINMM_CreateIData
(
hInstDLL
))
return
FALSE
;
if
(
!
MMDRV_Init
())
{
WINMM_DeleteIData
();
return
FALSE
;
}
break
;
case
DLL_PROCESS_DETACH
:
/* close all opened MCI drivers */
...
...
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