From 322f45cfcace6034b214f73b8c5e2afc91f9be58 Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Mon, 27 Sep 1999 13:35:15 +0000 Subject: [PATCH] Got rid of hack on MIDHDR's reserved field for 16/32 bit discrimination. --- multimedia/midi.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/multimedia/midi.c b/multimedia/midi.c index 1142e5378e8..dd8275b70c6 100644 --- a/multimedia/midi.c +++ b/multimedia/midi.c @@ -453,8 +453,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime) WORD sbfb = FALSE; if (lpMidiHdr) { - LPBYTE lpData = ((DWORD)lpMidiHdr == lpMidiHdr->reserved) ? - (LPBYTE)lpMidiHdr->lpData : (LPBYTE)PTR_SEG_TO_LIN(lpMidiHdr->lpData); + LPBYTE lpData = lpMidiHdr->lpData; lpData[lpMidiHdr->dwBytesRecorded++] = value; if (lpMidiHdr->dwBytesRecorded == lpMidiHdr->dwBufferLength) { @@ -470,7 +469,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime) lpMidiHdr->dwFlags &= ~MHDR_INQUEUE; lpMidiHdr->dwFlags |= MHDR_DONE; MidiInDev[wDevID].lpQueueHdr = (LPMIDIHDR)lpMidiHdr->lpNext; - if (MIDI_NotifyClient(wDevID, MIM_LONGDATA, (DWORD)lpMidiHdr->reserved, dwTime) != MMSYSERR_NOERROR) { + if (MIDI_NotifyClient(wDevID, MIM_LONGDATA, (DWORD)lpMidiHdr, dwTime) != MMSYSERR_NOERROR) { WARN("Couldn't notify client\n"); } } @@ -1418,8 +1417,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) return MIDIERR_NODEVICE; } - lpData = ((DWORD)lpMidiHdr == lpMidiHdr->reserved) ? - (LPBYTE)lpMidiHdr->lpData : (LPBYTE)PTR_SEG_TO_LIN(lpMidiHdr->lpData); + lpData = lpMidiHdr->lpData; if (lpData == NULL) return MIDIERR_UNPREPARED; @@ -1474,7 +1472,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) lpMidiHdr->dwFlags &= ~MHDR_INQUEUE; lpMidiHdr->dwFlags |= MHDR_DONE; - if (MIDI_NotifyClient(wDevID, MOM_DONE, lpMidiHdr->reserved, 0L) != MMSYSERR_NOERROR) { + if (MIDI_NotifyClient(wDevID, MOM_DONE, (DWORD)lpMidiHdr, 0L) != MMSYSERR_NOERROR) { WARN("can't notify client !\n"); return MMSYSERR_INVALPARAM; }