Commit e64a2e11 authored by Anton Baskanov's avatar Anton Baskanov Committed by Alexandre Julliard

amstream: Use current format to create surface in AMDirectDrawStream::CreateSample.

parent 47ab1240
...@@ -1420,15 +1420,22 @@ static HRESULT ddrawstreamsample_create(struct ddraw_stream *parent, IDirectDraw ...@@ -1420,15 +1420,22 @@ static HRESULT ddrawstreamsample_create(struct ddraw_stream *parent, IDirectDraw
desc.dwSize = sizeof(desc); desc.dwSize = sizeof(desc);
desc.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT; desc.dwFlags = DDSD_CAPS|DDSD_HEIGHT|DDSD_WIDTH|DDSD_PIXELFORMAT;
desc.dwHeight = 100; desc.dwHeight = parent->format.height;
desc.dwWidth = 100; desc.dwWidth = parent->format.width;
desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat); if (parent->format.flags & DDSD_PIXELFORMAT)
desc.ddpfPixelFormat.dwFlags = DDPF_RGB; {
desc.ddpfPixelFormat.u1.dwRGBBitCount = 32; desc.ddpfPixelFormat = parent->format.pf;
desc.ddpfPixelFormat.u2.dwRBitMask = 0xff0000; }
desc.ddpfPixelFormat.u3.dwGBitMask = 0x00ff00; else
desc.ddpfPixelFormat.u4.dwBBitMask = 0x0000ff; {
desc.ddpfPixelFormat.u5.dwRGBAlphaBitMask = 0; desc.ddpfPixelFormat.dwSize = sizeof(desc.ddpfPixelFormat);
desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
desc.ddpfPixelFormat.u1.dwRGBBitCount = 32;
desc.ddpfPixelFormat.u2.dwRBitMask = 0xff0000;
desc.ddpfPixelFormat.u3.dwGBitMask = 0x00ff00;
desc.ddpfPixelFormat.u4.dwBBitMask = 0x0000ff;
desc.ddpfPixelFormat.u5.dwRGBAlphaBitMask = 0;
}
desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN; desc.ddsCaps.dwCaps = DDSCAPS_SYSTEMMEMORY|DDSCAPS_OFFSCREENPLAIN;
desc.lpSurface = NULL; desc.lpSurface = NULL;
......
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