Commit 322f45cf authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Got rid of hack on MIDHDR's reserved field for 16/32 bit

discrimination.
parent 31655a69
...@@ -453,8 +453,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime) ...@@ -453,8 +453,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime)
WORD sbfb = FALSE; WORD sbfb = FALSE;
if (lpMidiHdr) { if (lpMidiHdr) {
LPBYTE lpData = ((DWORD)lpMidiHdr == lpMidiHdr->reserved) ? LPBYTE lpData = lpMidiHdr->lpData;
(LPBYTE)lpMidiHdr->lpData : (LPBYTE)PTR_SEG_TO_LIN(lpMidiHdr->lpData);
lpData[lpMidiHdr->dwBytesRecorded++] = value; lpData[lpMidiHdr->dwBytesRecorded++] = value;
if (lpMidiHdr->dwBytesRecorded == lpMidiHdr->dwBufferLength) { if (lpMidiHdr->dwBytesRecorded == lpMidiHdr->dwBufferLength) {
...@@ -470,7 +469,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime) ...@@ -470,7 +469,7 @@ static void midReceiveChar(WORD wDevID, unsigned char value, DWORD dwTime)
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE; lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
lpMidiHdr->dwFlags |= MHDR_DONE; lpMidiHdr->dwFlags |= MHDR_DONE;
MidiInDev[wDevID].lpQueueHdr = (LPMIDIHDR)lpMidiHdr->lpNext; 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"); WARN("Couldn't notify client\n");
} }
} }
...@@ -1418,8 +1417,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) ...@@ -1418,8 +1417,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
return MIDIERR_NODEVICE; return MIDIERR_NODEVICE;
} }
lpData = ((DWORD)lpMidiHdr == lpMidiHdr->reserved) ? lpData = lpMidiHdr->lpData;
(LPBYTE)lpMidiHdr->lpData : (LPBYTE)PTR_SEG_TO_LIN(lpMidiHdr->lpData);
if (lpData == NULL) if (lpData == NULL)
return MIDIERR_UNPREPARED; return MIDIERR_UNPREPARED;
...@@ -1474,7 +1472,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize) ...@@ -1474,7 +1472,7 @@ static DWORD modLongData(WORD wDevID, LPMIDIHDR lpMidiHdr, DWORD dwSize)
lpMidiHdr->dwFlags &= ~MHDR_INQUEUE; lpMidiHdr->dwFlags &= ~MHDR_INQUEUE;
lpMidiHdr->dwFlags |= MHDR_DONE; 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"); WARN("can't notify client !\n");
return MMSYSERR_INVALPARAM; return MMSYSERR_INVALPARAM;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment