- Applied to all MCI drivers Dmitry's fix for MCI_STATUS_TIME_FORMAT

(wasn't returning string resource ID).
- Fixed mciseq when opened without a filename.
This commit is contained in:
Eric Pouech 2004-01-08 00:42:02 +00:00 committed by Alexandre Julliard
parent fcd9732f84
commit 6cf101c1b3
4 changed files with 10 additions and 12 deletions

View File

@ -460,7 +460,7 @@ static DWORD MCIANIM_mciStatus(UINT16 wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS
return 0; return 0;
case MCI_STATUS_TIME_FORMAT: case MCI_STATUS_TIME_FORMAT:
TRACE("MCI_STATUS_TIME_FORMAT !\n"); TRACE("MCI_STATUS_TIME_FORMAT !\n");
lpParms->dwReturn = MAKEMCIRESOURCE(MCI_FORMAT_MILLISECONDS, MCI_FORMAT_MILLISECONDS); lpParms->dwReturn = MAKEMCIRESOURCE(MCI_FORMAT_MILLISECONDS, MCI_FORMAT_MILLISECONDS_S);
TRACE("MCI_STATUS_TIME_FORMAT => %u\n", LOWORD(lpParms->dwReturn)); TRACE("MCI_STATUS_TIME_FORMAT => %u\n", LOWORD(lpParms->dwReturn));
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
return 0; return 0;

View File

@ -647,7 +647,7 @@ static DWORD MCICDA_Status(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpParm
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;
case MCI_STATUS_TIME_FORMAT: case MCI_STATUS_TIME_FORMAT:
lpParms->dwReturn = MAKEMCIRESOURCE(wmcda->dwTimeFormat, wmcda->dwTimeFormat); lpParms->dwReturn = MAKEMCIRESOURCE(wmcda->dwTimeFormat, MCI_FORMAT_RETURN_BASE + wmcda->dwTimeFormat);
TRACE("MCI_STATUS_TIME_FORMAT=%08x!\n", LOWORD(lpParms->dwReturn)); TRACE("MCI_STATUS_TIME_FORMAT=%08x!\n", LOWORD(lpParms->dwReturn));
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;

View File

@ -67,7 +67,7 @@ typedef struct tagWINE_MCIMIDI {
WORD wNotifyDeviceID; /* MCI device ID with a pending notification */ WORD wNotifyDeviceID; /* MCI device ID with a pending notification */
HANDLE hCallback; /* Callback handle for pending notification */ HANDLE hCallback; /* Callback handle for pending notification */
HMMIO hFile; /* mmio file handle open as Element */ HMMIO hFile; /* mmio file handle open as Element */
LPSTR lpstrElementName; /* Name of file */ LPSTR lpstrElementName; /* Name of file (if any) */
LPSTR lpstrCopyright; LPSTR lpstrCopyright;
LPSTR lpstrName; LPSTR lpstrName;
WORD dwStatus; /* one from MCI_MODE_xxxx */ WORD dwStatus; /* one from MCI_MODE_xxxx */
@ -726,6 +726,7 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParms)
wmm->hFile = 0; wmm->hFile = 0;
wmm->hMidi = 0; wmm->hMidi = 0;
wmm->lpstrElementName = NULL;
dwDeviceID = lpParms->wDeviceID; dwDeviceID = lpParms->wDeviceID;
TRACE("wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID); TRACE("wDevID=%04X (lpParams->wDeviceID=%08lX)\n", wDevID, dwDeviceID);
@ -741,15 +742,12 @@ static DWORD MIDI_mciOpen(UINT wDevID, DWORD dwFlags, LPMCI_OPEN_PARMSA lpParms)
wmm->nUseCount--; wmm->nUseCount--;
return MCIERR_FILE_NOT_FOUND; return MCIERR_FILE_NOT_FOUND;
} }
} else { wmm->lpstrElementName = HeapAlloc(GetProcessHeap(), 0, strlen(lpParms->lpstrElementName) + 1);
wmm->hFile = 0; strcpy(wmm->lpstrElementName, lpParms->lpstrElementName);
} }
} }
TRACE("hFile=%p\n", wmm->hFile); TRACE("hFile=%p\n", wmm->hFile);
/* FIXME: should I get a strdup() of it instead? */
wmm->lpstrElementName = HeapAlloc( GetProcessHeap(), 0, strlen(lpParms->lpstrElementName)+1 );
strcpy( wmm->lpstrElementName, lpParms->lpstrElementName );
wmm->lpstrCopyright = NULL; wmm->lpstrCopyright = NULL;
wmm->lpstrName = NULL; wmm->lpstrName = NULL;
@ -918,7 +916,7 @@ static DWORD MIDI_mciPlay(UINT wDevID, DWORD dwFlags, LPMCI_PLAY_PARMS lpParms)
if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID; if (wmm == NULL) return MCIERR_INVALID_DEVICE_ID;
if (wmm->hFile == 0) { if (wmm->hFile == 0) {
WARN("Can't play: no file '%s' !\n", wmm->lpstrElementName); WARN("Can't play: no file '%s' !\n", debugstr_a(wmm->lpstrElementName));
return MCIERR_FILE_NOT_FOUND; return MCIERR_FILE_NOT_FOUND;
} }
@ -1196,7 +1194,7 @@ static DWORD MIDI_mciRecord(UINT wDevID, DWORD dwFlags, LPMCI_RECORD_PARMS lpPar
if (wmm == 0) return MCIERR_INVALID_DEVICE_ID; if (wmm == 0) return MCIERR_INVALID_DEVICE_ID;
if (wmm->hFile == 0) { if (wmm->hFile == 0) {
WARN("Can't find file='%s' !\n", wmm->lpstrElementName); WARN("Can't find file='%s' !\n", debugstr_a(wmm->lpstrElementName));
return MCIERR_FILE_NOT_FOUND; return MCIERR_FILE_NOT_FOUND;
} }
start = 1; end = 99999; start = 1; end = 99999;
@ -1430,7 +1428,7 @@ static DWORD MIDI_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
TRACE("MCI_STATUS_READY = %u\n", LOWORD(lpParms->dwReturn)); TRACE("MCI_STATUS_READY = %u\n", LOWORD(lpParms->dwReturn));
break; break;
case MCI_STATUS_TIME_FORMAT: case MCI_STATUS_TIME_FORMAT:
lpParms->dwReturn = MAKEMCIRESOURCE(wmm->dwMciTimeFormat, wmm->dwMciTimeFormat); lpParms->dwReturn = MAKEMCIRESOURCE(wmm->dwMciTimeFormat, MCI_FORMAT_RETURN_BASE + wmm->dwMciTimeFormat);
TRACE("MCI_STATUS_TIME_FORMAT => %u\n", LOWORD(lpParms->dwReturn)); TRACE("MCI_STATUS_TIME_FORMAT => %u\n", LOWORD(lpParms->dwReturn));
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;

View File

@ -1383,7 +1383,7 @@ static DWORD WAVE_mciStatus(UINT wDevID, DWORD dwFlags, LPMCI_STATUS_PARMS lpPar
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;
case MCI_STATUS_TIME_FORMAT: case MCI_STATUS_TIME_FORMAT:
lpParms->dwReturn = MAKEMCIRESOURCE(wmw->dwMciTimeFormat, wmw->dwMciTimeFormat); lpParms->dwReturn = MAKEMCIRESOURCE(wmw->dwMciTimeFormat, MCI_FORMAT_RETURN_BASE + wmw->dwMciTimeFormat);
TRACE("MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->dwReturn); TRACE("MCI_STATUS_TIME_FORMAT => %lu\n", lpParms->dwReturn);
ret = MCI_RESOURCE_RETURNED; ret = MCI_RESOURCE_RETURNED;
break; break;