Commit e8aebfcb authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

dsound: Assign to structs instead of using CopyMemory.

parent cb7b58c5
......@@ -1366,7 +1366,7 @@ HRESULT IDirectSoundCaptureBufferImpl_Create(
if (wfex->wFormatTag == WAVE_FORMAT_PCM) {
device->pwfx = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEFORMATEX));
CopyMemory(device->pwfx, wfex, sizeof(WAVEFORMATEX));
*device->pwfx = *wfex;
device->pwfx->cbSize = 0;
} else {
device->pwfx = HeapAlloc(GetProcessHeap(),0,sizeof(WAVEFORMATEX)+wfex->cbSize);
......
......@@ -254,19 +254,19 @@ HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest)
if ( IsEqualGUID( &DSDEVID_DefaultPlayback, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoicePlayback, pGuidSrc ) ) {
CopyMemory(pGuidDest, &DSOUND_renderer_guids[ds_default_playback], sizeof(GUID));
*pGuidDest = DSOUND_renderer_guids[ds_default_playback];
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
}
if ( IsEqualGUID( &DSDEVID_DefaultCapture, pGuidSrc ) ||
IsEqualGUID( &DSDEVID_DefaultVoiceCapture, pGuidSrc ) ) {
CopyMemory(pGuidDest, &DSOUND_capture_guids[ds_default_capture], sizeof(GUID));
*pGuidDest = DSOUND_capture_guids[ds_default_capture];
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
}
CopyMemory(pGuidDest, pGuidSrc, sizeof(GUID));
*pGuidDest = *pGuidSrc;
TRACE("returns %s\n", get_device_id(pGuidDest));
return DS_OK;
......
......@@ -1173,7 +1173,7 @@ HRESULT PrimaryBufferImpl_Create(
dsb->device = device;
dsb->lpVtbl = &dspbvt;
CopyMemory(&device->dsbd, dsbd, sizeof(*dsbd));
device->dsbd = *dsbd;
TRACE("Created primary buffer at %p\n", dsb);
TRACE("(formattag=0x%04x,chans=%d,samplerate=%d,"
......
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