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