mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[WINESYNC]d3dx9_36: Add support for FOURCC surface to save_dds_surface_to_memory.
wine-staging patch by Christian Costa <titan.costa@gmail.com>
This commit is contained in:
parent
71c6a60ad4
commit
ea80aaf8ad
2 changed files with 27 additions and 0 deletions
|
@ -395,6 +395,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
|
|||
}
|
||||
}
|
||||
|
||||
/* Reuse dds_fourcc_to_d3dformat as D3DFORMAT and FOURCC are DWORD with same values */
|
||||
if (dds_fourcc_to_d3dformat(d3dformat) != D3DFMT_UNKNOWN)
|
||||
{
|
||||
pixel_format->flags |= DDS_PF_FOURCC;
|
||||
pixel_format->fourcc = d3dformat;
|
||||
return D3D_OK;
|
||||
}
|
||||
|
||||
WARN("Unknown pixel format %#x\n", d3dformat);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
diff --git a/dll/directx/wine/d3dx9_36/surface.c b/dll/directx/wine/d3dx9_36/surface.c
|
||||
index 01729ea..185d4f4 100644
|
||||
--- a/dll/directx/wine/d3dx9_36/surface.c
|
||||
+++ b/dll/directx/wine/d3dx9_36/surface.c
|
||||
@@ -395,6 +395,14 @@ static HRESULT d3dformat_to_dds_pixel_format(struct dds_pixel_format *pixel_form
|
||||
}
|
||||
}
|
||||
|
||||
+ /* Reuse dds_fourcc_to_d3dformat as D3DFORMAT and FOURCC are DWORD with same values */
|
||||
+ if (dds_fourcc_to_d3dformat(d3dformat) != D3DFMT_UNKNOWN)
|
||||
+ {
|
||||
+ pixel_format->flags |= DDS_PF_FOURCC;
|
||||
+ pixel_format->fourcc = d3dformat;
|
||||
+ return D3D_OK;
|
||||
+ }
|
||||
+
|
||||
WARN("Unknown pixel format %#x\n", d3dformat);
|
||||
return E_NOTIMPL;
|
||||
}
|
Loading…
Reference in a new issue