Signed-off-by: Huw Davies huw@codeweavers.com --- dlls/wineoss.drv/midi.c | 17 ----------------- dlls/wineoss.drv/ossmidi.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index 9615c9892b9..cda733b9ca3 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -648,21 +648,6 @@ static DWORD midStop(WORD wDevID)
/*-----------------------------------------------------------------------*/
-/************************************************************************** - * modGetDevCaps [internal] - */ -static DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPSW lpCaps, DWORD dwSize) -{ - TRACE("(%04X, %p, %08X);\n", wDevID, lpCaps, dwSize); - - if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID; - if (lpCaps == NULL) return MMSYSERR_INVALPARAM; - - memcpy(lpCaps, &MidiOutDev[wDevID].caps, min(dwSize, sizeof(*lpCaps))); - - return MMSYSERR_NOERROR; -} - /************************************************************************** * modGetVolume [internal] */ @@ -768,8 +753,6 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return OSS_MidiInit(); case DRVM_EXIT: return OSS_MidiExit(); - case MODM_GETDEVCAPS: - return modGetDevCaps(wDevID, (LPMIDIOUTCAPSW)dwParam1, dwParam2); case MODM_GETNUMDEVS: return MODM_NumDevs; case MODM_GETVOLUME: diff --git a/dlls/wineoss.drv/ossmidi.c b/dlls/wineoss.drv/ossmidi.c index b97c5159e89..d9b2bbe7c92 100644 --- a/dlls/wineoss.drv/ossmidi.c +++ b/dlls/wineoss.drv/ossmidi.c @@ -1044,6 +1044,19 @@ static UINT midi_out_unprepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) return MMSYSERR_NOERROR; }
+static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size) +{ + TRACE("(%04X, %p, %08X);\n", dev_id, caps, size); + + if (dev_id >= num_dests) return MMSYSERR_BADDEVICEID; + if (!caps) return MMSYSERR_INVALPARAM; + + memcpy(caps, &dests[dev_id].caps, min(size, sizeof(*caps))); + + return MMSYSERR_NOERROR; +} + + NTSTATUS midi_out_message(void *args) { struct midi_out_message_params *params = args; @@ -1075,6 +1088,9 @@ NTSTATUS midi_out_message(void *args) case MODM_UNPREPARE: *params->err = midi_out_unprepare(params->dev_id, (MIDIHDR *)params->param_1, params->param_2); break; + case MODM_GETDEVCAPS: + *params->err = midi_out_get_devcaps(params->dev_id, (MIDIOUTCAPSW *)params->param_1, params->param_2); + break; default: TRACE("Unsupported message\n"); *params->err = MMSYSERR_NOTSUPPORTED;
Signed-off-by: Andrew Eikum aeikum@codeweavers.com
On Fri, Apr 22, 2022 at 07:08:38AM +0100, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/wineoss.drv/midi.c | 17 ----------------- dlls/wineoss.drv/ossmidi.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 17 deletions(-)
diff --git a/dlls/wineoss.drv/midi.c b/dlls/wineoss.drv/midi.c index 9615c9892b9..cda733b9ca3 100644 --- a/dlls/wineoss.drv/midi.c +++ b/dlls/wineoss.drv/midi.c @@ -648,21 +648,6 @@ static DWORD midStop(WORD wDevID)
/*-----------------------------------------------------------------------*/
-/**************************************************************************
modGetDevCaps [internal]
- */
-static DWORD modGetDevCaps(WORD wDevID, LPMIDIOUTCAPSW lpCaps, DWORD dwSize) -{
- TRACE("(%04X, %p, %08X);\n", wDevID, lpCaps, dwSize);
- if (wDevID >= MODM_NumDevs) return MMSYSERR_BADDEVICEID;
- if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
- memcpy(lpCaps, &MidiOutDev[wDevID].caps, min(dwSize, sizeof(*lpCaps)));
- return MMSYSERR_NOERROR;
-}
/**************************************************************************
modGetVolume [internal]
*/ @@ -768,8 +753,6 @@ DWORD WINAPI OSS_modMessage(UINT wDevID, UINT wMsg, DWORD_PTR dwUser, return OSS_MidiInit(); case DRVM_EXIT: return OSS_MidiExit();
- case MODM_GETDEVCAPS:
- return modGetDevCaps(wDevID, (LPMIDIOUTCAPSW)dwParam1, dwParam2); case MODM_GETNUMDEVS: return MODM_NumDevs; case MODM_GETVOLUME:
diff --git a/dlls/wineoss.drv/ossmidi.c b/dlls/wineoss.drv/ossmidi.c index b97c5159e89..d9b2bbe7c92 100644 --- a/dlls/wineoss.drv/ossmidi.c +++ b/dlls/wineoss.drv/ossmidi.c @@ -1044,6 +1044,19 @@ static UINT midi_out_unprepare(WORD dev_id, MIDIHDR *hdr, UINT hdr_size) return MMSYSERR_NOERROR; }
+static UINT midi_out_get_devcaps(WORD dev_id, MIDIOUTCAPSW *caps, UINT size) +{
- TRACE("(%04X, %p, %08X);\n", dev_id, caps, size);
- if (dev_id >= num_dests) return MMSYSERR_BADDEVICEID;
- if (!caps) return MMSYSERR_INVALPARAM;
- memcpy(caps, &dests[dev_id].caps, min(size, sizeof(*caps)));
- return MMSYSERR_NOERROR;
+}
NTSTATUS midi_out_message(void *args) { struct midi_out_message_params *params = args; @@ -1075,6 +1088,9 @@ NTSTATUS midi_out_message(void *args) case MODM_UNPREPARE: *params->err = midi_out_unprepare(params->dev_id, (MIDIHDR *)params->param_1, params->param_2); break;
- case MODM_GETDEVCAPS:
*params->err = midi_out_get_devcaps(params->dev_id, (MIDIOUTCAPSW *)params->param_1, params->param_2);
default: TRACE("Unsupported message\n"); *params->err = MMSYSERR_NOTSUPPORTED;break;
-- 2.25.1