Commit 48b32c78 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

dsound: Avoid casts from COM object to interface.

parent d7662881
...@@ -452,8 +452,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer( ...@@ -452,8 +452,8 @@ static HRESULT DirectSoundDevice_CreateSoundBuffer(
if (device->primary) { if (device->primary) {
WARN("Primary Buffer already created\n"); WARN("Primary Buffer already created\n");
IDirectSoundBuffer_AddRef((LPDIRECTSOUNDBUFFER8)(device->primary)); IDirectSoundBuffer8_AddRef(&device->primary->IDirectSoundBuffer8_iface);
*ppdsb = (LPDIRECTSOUNDBUFFER)(device->primary); *ppdsb = (IDirectSoundBuffer *)&device->primary->IDirectSoundBuffer8_iface;
} else { } else {
hres = primarybuffer_create(device, &device->primary, dsbd); hres = primarybuffer_create(device, &device->primary, dsbd);
if (device->primary) { if (device->primary) {
......
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