=?UTF-8?Q?J=C3=B6rg=20H=C3=B6hle=20?=: mciseq: wNotifyDeviceID is redundant .
Alexandre Julliard
julliard at winehq.org
Wed Jan 4 13:53:00 CST 2012
Module: wine
Branch: master
Commit: 387b359a7eaf1115ac734d18d2f2e36806aba250
URL: http://source.winehq.org/git/wine.git/?a=commit;h=387b359a7eaf1115ac734d18d2f2e36806aba250
Author: Jörg Höhle <hoehle at users.sourceforge.net>
Date: Wed Dec 15 22:56:08 2010 +0100
mciseq: wNotifyDeviceID is redundant.
---
dlls/mciseq/mcimidi.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/dlls/mciseq/mcimidi.c b/dlls/mciseq/mcimidi.c
index e7671d6..2783c07 100644
--- a/dlls/mciseq/mcimidi.c
+++ b/dlls/mciseq/mcimidi.c
@@ -61,7 +61,6 @@ typedef struct tagWINE_MCIMIDI {
UINT wDevID; /* the MCI one */
HMIDI hMidi;
int nUseCount; /* Incremented for each shared open */
- MCIDEVICEID wNotifyDeviceID; /* MCI device ID with a pending notification */
HANDLE hCallback; /* Callback handle for pending notification */
HMMIO hFile; /* mmio file handle open as Element */
LPWSTR lpstrElementName; /* Name of file (if any) */
@@ -219,7 +218,7 @@ static void MIDI_mciNotify(DWORD_PTR hWndCallBack, WINE_MCIMIDI* wmm, UINT wStat
/* We simply save one parameter by not passing the wDevID local
* to the command. They are the same (via mciGetDriverData).
*/
- MCIDEVICEID wDevID = wmm->wNotifyDeviceID;
+ MCIDEVICEID wDevID = wmm->wDevID;
HANDLE old = InterlockedExchangePointer(&wmm->hCallback, NULL);
if (old) mciDriverNotify(old, wDevID, MCI_NOTIFY_SUPERSEDED);
mciDriverNotify(HWND_32(LOWORD(hWndCallBack)), wDevID, wStatus);
@@ -767,7 +766,6 @@ static DWORD MIDI_mciOpen(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_OPEN_PARMSW lp
wmm->lpstrCopyright = NULL;
wmm->lpstrName = NULL;
- wmm->wNotifyDeviceID = wmm->wDevID;
wmm->dwStatus = MCI_MODE_NOT_READY; /* while loading file contents */
/* spec says it should be the default format from the MIDI file... */
wmm->dwMciTimeFormat = MCI_FORMAT_MILLISECONDS;
@@ -1563,11 +1561,8 @@ static DWORD MIDI_mciSeek(WINE_MCIMIDI* wmm, DWORD dwFlags, LPMCI_SEEK_PARMS lpP
TRACE("Seeking to position=%u ms\n", wmm->dwPositionMS);
- if (dwFlags & MCI_NOTIFY) {
- TRACE("MCI_NOTIFY_SUCCESSFUL %08lX !\n", lpParms->dwCallback);
- mciDriverNotify(HWND_32(LOWORD(lpParms->dwCallback)),
- wmm->wNotifyDeviceID, MCI_NOTIFY_SUCCESSFUL);
- }
+ if (dwFlags & MCI_NOTIFY)
+ MIDI_mciNotify(lpParms->dwCallback, wmm, MCI_NOTIFY_SUCCESSFUL);
}
return ret;
}
More information about the wine-cvs
mailing list