Commit e14ae47c authored by Robert Reif's avatar Robert Reif Committed by Alexandre Julliard

Only return the number of bytes requested.

parent e490139d
...@@ -1200,13 +1200,15 @@ UINT16 WINAPI waveOutGetDevCaps16(UINT16 uDeviceID, ...@@ -1200,13 +1200,15 @@ UINT16 WINAPI waveOutGetDevCaps16(UINT16 uDeviceID,
ret = waveOutGetDevCapsA(uDeviceID, &wocA, sizeof(wocA)); ret = waveOutGetDevCapsA(uDeviceID, &wocA, sizeof(wocA));
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
lpCaps->wMid = wocA.wMid; WAVEOUTCAPS16 woc16;
lpCaps->wPid = wocA.wPid; woc16.wMid = wocA.wMid;
lpCaps->vDriverVersion = wocA.vDriverVersion; woc16.wPid = wocA.wPid;
strcpy(lpCaps->szPname, wocA.szPname); woc16.vDriverVersion = wocA.vDriverVersion;
lpCaps->dwFormats = wocA.dwFormats; strcpy(woc16.szPname, wocA.szPname);
lpCaps->wChannels = wocA.wChannels; woc16.dwFormats = wocA.dwFormats;
lpCaps->dwSupport = wocA.dwSupport; woc16.wChannels = wocA.wChannels;
woc16.dwSupport = wocA.dwSupport;
memcpy(lpCaps, &woc16, uSize);
} }
return ret; return ret;
} }
...@@ -1495,12 +1497,14 @@ UINT16 WINAPI waveInGetDevCaps16(UINT16 uDeviceID, LPWAVEINCAPS16 lpCaps, ...@@ -1495,12 +1497,14 @@ UINT16 WINAPI waveInGetDevCaps16(UINT16 uDeviceID, LPWAVEINCAPS16 lpCaps,
if (lpCaps == NULL) return MMSYSERR_INVALPARAM; if (lpCaps == NULL) return MMSYSERR_INVALPARAM;
if (ret == MMSYSERR_NOERROR) { if (ret == MMSYSERR_NOERROR) {
lpCaps->wMid = wicA.wMid; WAVEINCAPS16 wic16;
lpCaps->wPid = wicA.wPid; wic16.wMid = wicA.wMid;
lpCaps->vDriverVersion = wicA.vDriverVersion; wic16.wPid = wicA.wPid;
strcpy(lpCaps->szPname, wicA.szPname); wic16.vDriverVersion = wicA.vDriverVersion;
lpCaps->dwFormats = wicA.dwFormats; strcpy(wic16.szPname, wicA.szPname);
lpCaps->wChannels = wicA.wChannels; wic16.dwFormats = wicA.dwFormats;
wic16.wChannels = wicA.wChannels;
memcpy(lpCaps, &wic16, uSize);
} }
return ret; return ret;
} }
......
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