Maarten Lankhorst : midimap: Defer initialisation.
Alexandre Julliard
julliard at winehq.org
Wed Mar 17 12:19:06 CDT 2010
Module: wine
Branch: master
Commit: 8c88b5115adf28fe14a7a247aa5811900477b1ea
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8c88b5115adf28fe14a7a247aa5811900477b1ea
Author: Maarten Lankhorst <m.b.lankhorst at gmail.com>
Date: Wed Mar 17 10:50:24 2010 +0100
midimap: Defer initialisation.
---
dlls/midimap/midimap.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/dlls/midimap/midimap.c b/dlls/midimap/midimap.c
index 5df8472..833c2f7 100644
--- a/dlls/midimap/midimap.c
+++ b/dlls/midimap/midimap.c
@@ -495,6 +495,9 @@ static DWORD modReset(MIDIMAPDATA* mom)
return ret;
}
+static LRESULT MIDIMAP_drvOpen(void);
+static LRESULT MIDIMAP_drvClose(void);
+
/**************************************************************************
* modMessage (MIDIMAP.@)
*/
@@ -507,7 +510,9 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
switch (wMsg)
{
case DRVM_INIT:
+ return MIDIMAP_drvOpen();
case DRVM_EXIT:
+ return MIDIMAP_drvClose();
case DRVM_ENABLE:
case DRVM_DISABLE:
/* FIXME: Pretend this is supported */
@@ -539,7 +544,7 @@ DWORD WINAPI MIDIMAP_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser,
/**************************************************************************
* MIDIMAP_drvOpen [internal]
*/
-static LRESULT MIDIMAP_drvOpen(LPSTR str)
+static LRESULT MIDIMAP_drvOpen(void)
{
MIDIOUTCAPSW moc;
unsigned dev, i;
@@ -574,7 +579,7 @@ static LRESULT MIDIMAP_drvOpen(LPSTR str)
/**************************************************************************
* MIDIMAP_drvClose [internal]
*/
-static LRESULT MIDIMAP_drvClose(DWORD_PTR dwDevID)
+static LRESULT MIDIMAP_drvClose(void)
{
if (midiOutPorts)
{
@@ -598,8 +603,8 @@ LRESULT CALLBACK MIDIMAP_DriverProc(DWORD_PTR dwDevID, HDRVR hDriv, UINT wMsg,
{
case DRV_LOAD: return 1;
case DRV_FREE: return 1;
- case DRV_OPEN: return MIDIMAP_drvOpen((LPSTR)dwParam1);
- case DRV_CLOSE: return MIDIMAP_drvClose(dwDevID);
+ case DRV_OPEN: return 1;
+ case DRV_CLOSE: return 1;
case DRV_ENABLE: return 1;
case DRV_DISABLE: return 1;
case DRV_QUERYCONFIGURE: return 1;
More information about the wine-cvs
mailing list